Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Feature request] Provide parse, compile, merge and check functions #143
It would be cool if you can provide functionality for parsing, merging and compiling GraphQL queries. So not only Relay can use awesome features of GraphQL.
Consider this example:
Using suggested functions it can be merged in:
They expose parser and AST visitor as public API and you can import
Finally, you can import
As far as query optimization goes, I defer to graphql team, but wouldn't think it make sense to have that in the reference implementation. It is perhaps a layer you have in between GraphQL endpoint and data store that caches and consolidates redundant queries, see Haxl for inspiration.