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
Is your feature request related to a problem? Please describe.
I need to support multiple GraphQL schemas in frontend, and need to implement custom loader to pick correct GraphQL operations. However, I'm now stuck as GraphQL codegen uses @graphql-tools/load, and it's custom loader support doesn't allow me to return multiple documents from the loader. If i combine all operations from different files into single document, then GraphQL codegen generated code wrong.
Describe the solution you'd like
collectCustomLoader could check if result of running loader is an array, and run addResultOfCustomLoader for each of the items.
Describe alternatives you've considered
Currently I don't have workaround for this.
Additional context
I have defined loader like below. Additionally it would be very helpful if you could specify function as loader instead of needing to go via JS file.
Is your feature request related to a problem? Please describe.
I need to support multiple GraphQL schemas in frontend, and need to implement custom loader to pick correct GraphQL operations. However, I'm now stuck as GraphQL codegen uses @graphql-tools/load, and it's custom loader support doesn't allow me to return multiple documents from the loader. If i combine all operations from different files into single document, then GraphQL codegen generated code wrong.
Describe the solution you'd like
collectCustomLoader
could check if result of running loader is an array, and runaddResultOfCustomLoader
for each of the items.Describe alternatives you've considered
Currently I don't have workaround for this.
Additional context
I have defined loader like below. Additionally it would be very helpful if you could specify function as loader instead of needing to go via JS file.
The text was updated successfully, but these errors were encountered: