Hi. I have a query:
{
field(withScope: A) {
data { ... }
otherData { ... }
}
}
I want to federate the resolvers for data
and otherData
into its own subgraph. These resolvers should return data scoped to the input argument withScope
.
The service resolving field
isn’t looking up some data it has knowledge of in order to get some foreign key that can be used as a key field for the return type - it’s there to join data
and otherData
to the same scope. It’s likely that both data
and otherData
will be requested at the same time.
I’ve considered adding a field to the return type of field
that hashes the input arguments as the key to subgraphs, but it feels weird to expose this detail in the external API.
Does marking the field
as resolvable by both the data
and otherData
fields help?
Is there another way?
Thanks, Dan.