Allow passing an already created GraphQLContext to ExecutionInput #3925
samuelAndalon
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
We did this on purpose - we wanted an object we can KNOW the state of better - the graphql engine then can put "objects" into the context itself at runtime eg We want this to be per request and we dont want some objects in the context to transfer over. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
You can put a shared container into the GraphQLContext for each batched operation. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
an http request could contain multiple graphql operations (batching), a GraphQLContext could be shared among all the ExecutionInput created from the batch, the current ExecutionInput does not allow passing a GraphQLContext, instead a map needs to be provided, which is most cases is fine, however, this will cause a lot of avoidable GraphQLContext object allocations
it would be great of the ExecutionInput Builder would allow passing a GraphQLContext
Beta Was this translation helpful? Give feedback.
All reactions