Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway stopped sending subscription data without wrapping scalar value #530

Closed
Santinell opened this issue Jul 8, 2021 · 2 comments
Closed

Comments

@Santinell
Copy link

At first I faced with a problem described in #370
As recommended I wrapped my data and this:

extend type Subscription {
  onUpdate(project: ObjectID): JSONObject
  onCreate(project: ObjectID): JSONObject
  onRemove(project: ObjectID): JSONObject
}

became this:

type Event {
  data: JSONObject
}

extend type Subscription {
  onUpdate(project: ObjectID, types: [String]): Event
  onCreate(project: ObjectID, types: [String]): Event
  onRemove(project: ObjectID, types: [String]): Event
}

where JSONObject is scalar type from graphql-scalars.

When issue #370 was closed, I tried to change my schema back
and faced with another problem - gateway stopped sending data on subscription.
Of course for test I changed: 1. schema 2. resolver 3. query for subscribing.
Could it be that fix #508 added support only for simple scalar values like strings and numbers?

By the way gateway printing this in console:
Scalar with variable inputs detected for parsing AST literals. This is not supported.
I am not sure if it's connected.

@mcollina
Copy link
Collaborator

mcollina commented Jul 8, 2021

I'm pretty sure it's connected. However i don't have much time to investigate/fix this. Would you like do send a PR?

@Santinell
Copy link
Author

Ok, I'll try to investigate this problem, but it would take a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants