The target is to pass field collection context GetOperationContext into the Dataloader. In the resolvers we are passing the context into the retriever but it doesn't contain the the info that we need to get the fields of the query on that level. So I tried to change that on the Middleware layer but without hope. Do you know if there is a way to pass that context on the Dataloaders ?
FYI the error happen when I try to pass the field collection of the nested model in Dataloader, panic missing operation context
What did you expect?
When I was passing the context in the resolver I was expecting that I will have all the info to get the fields and use GetOperationContext to get them and pass them in Dataloader.
Minimal graphql.schema and models to reproduce
rootQuery(
name: ["Alex"]) {
name
email
tel
ProductsInfo{
id
name
description
}
}
}
What happened?
The target is to pass field collection context
GetOperationContext
into the Dataloader. In the resolvers we are passing the context into the retriever but it doesn't contain the the info that we need to get the fields of the query on that level. So I tried to change that on the Middleware layer but without hope. Do you know if there is a way to pass that context on the Dataloaders ? FYI the error happen when I try to pass the field collection of the nested model in Dataloader,panic missing operation context
What did you expect?
When I was passing the context in the resolver I was expecting that I will have all the info to get the fields and use GetOperationContext to get them and pass them in Dataloader.
Minimal graphql.schema and models to reproduce