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

[WIP] adding 'subscription' language to GraphQL spec #109

Closed
wants to merge 1 commit into from

Conversation

skevy
Copy link

@skevy skevy commented Oct 21, 2015

This PR adds language around the subscription operation type, which landed experimentally in graphql-js@0.4.8, to the GraphQL specification.

This is a WIP - there's still discussion to be had around subscriptions and what they mean for GraphQL, but I wanted to get the ball rolling on this so the can didn't get kicked too far down the road and also so that there was a place to discuss subscriptions in the context of the actual GraphQL specification.

@taion
Copy link

taion commented Nov 11, 2015

Are there any blockers on this PR? graphql-js now expects subscriptionType to be present under __schema on introspection queries, but this isn't part of the spec at all.

@skevy
Copy link
Author

skevy commented Nov 11, 2015

/cc @leebyron

@skevy
Copy link
Author

skevy commented Nov 11, 2015

@taion I would presume that if there's a blocker at all, it's that subscription support in graphql-js is still experimental. Not sure how the GraphQL team wants to handle cases like that with the spec.

@taion
Copy link

taion commented Nov 11, 2015

Possibly just update the spec then? I think this is causing the Python guys some trouble with setting up the Relay babel plugin; specifically on running the packaged introspection query against a non-graphql-js server.

@@ -214,6 +215,19 @@ mutation {
}
```

This subscription operation will retrieve the current number of likes and create
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit is over-specified. A subscription doesn't have to do a retrieve then subscription, it probably only creates the subscription.

@leebyron
Copy link
Collaborator

Adding the introspection bit is a good idea, but the actual execution of these subscription queries should be intentionally under-defined for now. The spec should make it clear that subscription queries are experimental in a note.

@skevy
Copy link
Author

skevy commented Nov 11, 2015

@leebyron np and totally understood. I will update based on your comments.

OlegIlyenko added a commit to sangria-graphql/sangria that referenced this pull request Nov 18, 2015
@D1plo1d
Copy link

D1plo1d commented Apr 21, 2016

@skevy Any updates on this? We would like to implement subscriptions in Ruby but are waiting on an official spec and libgraphqlparser to do so.

@skevy
Copy link
Author

skevy commented Feb 16, 2017

Closing in favor of #267

@skevy skevy closed this Feb 16, 2017
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

Successfully merging this pull request may close these issues.

5 participants