-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Spec and Build client-side GraphQL parser. #21
Comments
What would be a good way to start helping on this? |
We're not sure yet. We'll speak with those working on GraphQL client tools at Facebook to figure out what will best support their needs and that will help us understand the direction to move in. |
More about #16 (I think?), but is there any vision for parsing the schema definition language into (partial) "AST" (which you now build by hand) and providing an API to define resolve functions for individual attributes? I have something roughly like this in mind:
There's obviously more thinking to be done around defining custom scalars, etc., but is this something that you have on the roadmap or would be interested in? |
This isn't something on the roadmap. We haven't considered an approach like that very seriously because while it could make simple cases more terse, it could also be harder to understand and harder to extend. Documentation, for example, is missing from this particular suggestion and a critical part of a well built GraphQL server, so we want to avoid giving tools that makes documentation harder rather than easier. There's probably something to a partial code-generation (similar to Rails or Yeoman) that would be really valuable to reduce typing, which is one of the interesting paths that could be taken for building a parser for client-side types. The primary desire for client-side types, at least from how I've seen GraphQL used at Facebook over the last 3 years, is for doing code-generation in our client applications when the types a GraphQL server provides need to be extended by the iOS or Android client. |
This is now mostly covered by #74 |
Individual changes increment towards this, and the tracking task is at graphql/graphql-spec#90 |
Client-side GraphQL should have access to the type IDL we refer to in the spec and any other features that are useful for client-side GraphQL development but have no semantic meaning for execution.
The text was updated successfully, but these errors were encountered: