You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am investigating this library to be used in our project. From what I am seeing, we need to pass a resolver struct whose fields/methods map to the graphQL query, and the engine recursively calls each of its nested fields.
What I am looking to achieve is to have a single root resolver, and I want to access the query AST myself to construct the full response. The reason for this is to be able to dynamically generate efficient SQL queries joining multiple tables, rather than querying multiple times. Similar to what https://hasura.io/ does.
Is there a way to achieve that using this library?
The text was updated successfully, but these errors were encountered:
It seems that I just need access to the query package to get its AST and then execute the query by my own. But the query package is under internal right now, and more interestingly the AST it returns (types.ExecutableDefinition) is public. And the query package just has one function Parse.
@agnivade I am working on exposing the selected fields in each resolver as well as their child fields. This has been the most requested feature to the library ever. There has been several PRs so far and a few ideas how to implement this. I'll continue the work on this next week when I'm back home. I'd be happy to explain in more details in Slack.
Hi,
I am investigating this library to be used in our project. From what I am seeing, we need to pass a resolver struct whose fields/methods map to the graphQL query, and the engine recursively calls each of its nested fields.
What I am looking to achieve is to have a single root resolver, and I want to access the query AST myself to construct the full response. The reason for this is to be able to dynamically generate efficient SQL queries joining multiple tables, rather than querying multiple times. Similar to what https://hasura.io/ does.
Is there a way to achieve that using this library?
The text was updated successfully, but these errors were encountered: