-
Notifications
You must be signed in to change notification settings - Fork 434
Build a GraphQL Client #61
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
Comments
@theduke do you still intend to tackle this? I would love to help but feel my rust-fu isn't quite there yet. |
@zsck mentioned in gitter that they might be interested in working on this and was looking for some pointers on how to get started. |
Like we have documented, the first step would be to extract the parser and AST from the main crate to make it reusable. This should also include making the AST easily shareable so it can be used with tokio. I believe @mhallin already did some experiments on that in this branch: https://github.com/graphql-rust/juniper/tree/async-experiments |
As mentioned on the issue just above this comment, I released a graphql-client` crate and I plan to keep improving it. It's in a usable state now. Broader collaboration to make GraphQL in Rust a good experience is something I am interested in, so don't hesitate to leave your thoughts on issue 20 or other topics :) |
Closing since we have the client in the org now. We still need to figure out what code can be shared between the client and juniper, though. |
There is another issue I opened about sharing query validation code (since it is in the spec and all that is needed is the query and the schema, as far as I know). Juniper has far better validation so the main beneficiary would be graphql-client. Other than that I don't have many ideas but it is of course interesting. |
I guess in a perfect world we would share:
It would also be awesome to instantiate a client from a server Schema definition, I haven't looked at the client code yet so I don't know how feasible this is. But that would be the ideal state for me. |
I have thought about using the juniper schema representation as an additional source (besides schema.json and .graphql schemas), but since graphql-client does code generation, we would need to instantiate the schema at compile time, which sounds challenging. |
All the pieces are there.
Building a client should be relatively straight forward.
I'll tackle this when I have some time.
The text was updated successfully, but these errors were encountered: