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 need to use batching since in one query itself there will be a lot of sub queries made for the extended field .
However since the query for this extended field doesn't conform to the assumptions (input argument is a CSV instead of array and the order of the returned results is not guraranteed) I wanted to wrap it into a new query which conforms to the required signature and assumptions.
I used additionalTypeDefs in the mesh to extend the query and additionalResolver in the hive gateway to add the implementation (args transformation and sorting)
However when querying this field, I get an error saying context[additionalResolvers.sourceName][additionalResolvers.sourceFieldName]..... not found.
I realize that additional resolvers don't have any source name, and also the resolver is not available in the context during the execution, All other queries and mutations in each subgraph are available in the context, just not the ones added using additionalTypeDefs and additionalResolvers. That's what the error message probbaly refers to.
Is this the the expected/accepted behaviour? If so, how do I use batching with resolveTo directive with an API that doesn't conform to the expectations?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Season's greetings!
I am trying to extend schema of a type to add a new field following this guide - https://the-guild.dev/graphql/mesh/v1/schema-extensions#batch-delegation-array-batching
I need to use batching since in one query itself there will be a lot of sub queries made for the extended field .
However since the query for this extended field doesn't conform to the assumptions (input argument is a CSV instead of array and the order of the returned results is not guraranteed) I wanted to wrap it into a new query which conforms to the required signature and assumptions.
I used
additionalTypeDefs
in the mesh to extend the query andadditionalResolver
in the hive gateway to add the implementation (args transformation and sorting)However when querying this field, I get an error saying
context[additionalResolvers.sourceName][additionalResolvers.sourceFieldName].....
not found.I realize that additional resolvers don't have any source name, and also the resolver is not available in the context during the execution, All other queries and mutations in each subgraph are available in the context, just not the ones added using additionalTypeDefs and additionalResolvers. That's what the error message probbaly refers to.
Is this the the expected/accepted behaviour? If so, how do I use batching with
resolveTo
directive with an API that doesn't conform to the expectations?Beta Was this translation helpful? Give feedback.
All reactions