-
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
Consider separating out GraphQL parsing #2
Comments
Closing because @josephsavona proved me wrong 😄 |
Cool, thanks for checking it out anyways. Seems like its hard to do too much more til we get a proper spec etc! |
Have you done anything about schema descriptions yet? Facebook's definitions look like https://twitter.com/schrockn/status/567902849272659968/photo/1 |
Support here is pretty half-hearted (and not documented) but I plan to "get on their level" and require descriptions at build time! |
feat(subscriptions) add ActionCable subscriptions
Facebook's implementation actually compiles GraphQL to an AST on the client side. This seems to be a prerequisite for Relay to work (maybe @leebyron or @schrockn can comment on this).
I propose that graphql-ruby starts moving in that direction. Instead of parsing GraphQL, the interface would accept and process a JSON AST. On the client side, you could use something like https://github.com/ooflorent/graphql-parser (or the Facebook reference implementation when it's released).
This would free graphql-ruby from worrying about parsing the query and handling variables. Everything would just come in the JSON AST. You could also fall back to processing a full query (for non-JS clients) using something like therubyracer.
I'm happy to work on this, but I'd like to hear your thoughts.
The text was updated successfully, but these errors were encountered: