Feature Request: ID Key #3622
gsouza-cat
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Starting with this GraphQL schema, assume that the 'id' field on Bar is used to resolve the 'bars' field on Foo.
If a caller makes the following query, the Bar resolver runs, but it is not needed, because only 'id' from Bar is requested (which is already known).
query Example { foo(id: "id") { id name bars { id } } }
It would be useful to tag ID fields on the 'bars' field of Foo, and skip calling the resolver if only those fields are requested in a query. This is how cosmo federation works with resolving a federated entity, which is a useful feature to have for efficiency. i.e. something like this:
Beta Was this translation helpful? Give feedback.
All reactions