-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Question: Executing and Returning Initial Query with Subscription #1910
Comments
No, it's not possible to return something on an initial subscription query. I'm currently working on a new runtime for GraphQL-Ruby and I'll add this issue to my list (#1884), since many folks have asked for similar improvements to subscriptions. Yes, you're right about where the logic is. You can see above that in some cases, the resolver is called, but the return value is ignored: |
Thanks for the response Robert! Appreciate the work you put into graphql-ruby (super useful library). Closing. |
Btw I was looking back on the spec and didn't see any mention one way or another about initial responses, do you? https://facebook.github.io/graphql/June2018/#sec-Subscription I see your link above is to the RFC, but I wonder if/how that made it to the spec. I'm going to add support for initial responses one way or another but I'll include a bit from the spec if I can find it! |
Hmm, I can not find anything within the spec linked. It seems like it'd be challenging to avoid race conditions without (via the query / subscribe combo. |
yeah, i agree 😉 |
Trying to add proper support for this in #1930 |
For a GraphQL subscription is it possible to execute the initial query (to support pseudo live-queries)?
Per FB RFC on subscriptions - I'm a bit unclear if this type of thing is meant to be supported:
Realize this can likely be done via a
Query
+Subscription
.Also - is the logic on controlling execution wrapped up here?:
https://github.com/rmosolgo/graphql-ruby/blob/master/lib/graphql/subscriptions/instrumentation.rb#L59
The text was updated successfully, but these errors were encountered: