Replies: 4 comments
-
|
You want to use info to parse the AST. Here's a great blog post about info field in javascript . You want to start with |
Beta Was this translation helpful? Give feedback.
-
|
Looking ahead is not easy, you have to handle:
fragment _ on MyStuff {
entries(filer: true)
moreEntries: entries(filter: false)
} |
Beta Was this translation helpful? Give feedback.
-
|
I am wondering whether it is not a "real problem" that is not easy. It's "my fault" that I am developing granular resolvers for fields, because I have everything in a relational database. If I didn't resolve the parent entry and the children with a single join, but two SQL queries, this would be easy to handle. There is an opposite argument instead that a good GraphQL framework should make multiple data resolution strategies in the backend equally simple to implement correctly, I don't know |
Beta Was this translation helpful? Give feedback.
-
|
Most GraphQL frameworks have a limited scope of defining schema/resolvers, they don't provide an answer on what to do inside of resolvers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I had this setup:
my resolver invokes a single service, passing down the entries filter.
I am considering a more graphql-idiomatic approach like so:
however in my resolver now it's unclear how to extract the filter from the query to pass it down to the service level. How do I do that?
Beta Was this translation helpful? Give feedback.
All reactions