-
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
Submit custom GraphQL queries from Provider
#3095
Comments
In #3047 I reused a lot of what we already have in the SDK to create a custom query, we could do something similar but more flexibly. Have a public function on the provider that takes a document and variables and passes the whole thing to requester, similarly to how we already build our operations. |
Provider
SDK Query Optimization Issue DocumentationCurrent ProblemPublic Auto-Generated GraphQL Client
Breaking Changes
Ideal SolutionMake
|
Any thoughts on this @FuelLabs/frontend? |
graphql-zeus looks really promising and might be the library that would enable both this and #1570 in one go. |
Currently we interact with GraphQL endpoints supplied by the node via wrapped operations provided by
graphql-codegen
, these are then exposed to SDK consumers via wrapped provider functions (Provider.getVersion()
,Provider.getBlockNumber()
etc). This potentially restricts the information we are providing to consumers or means they have to go around the SDK to query the node. We should provide a way for consumers to submit their own custom queries.Potential implmentation in
Provider
The text was updated successfully, but these errors were encountered: