Hi there 😊
I was looking at this PR on Strawberry: strawberry-graphql/strawberry#3461
and I was wondering if there's a nicer to pass the input extensions data around, so I stumbled on the ExecutionContext class which can be useful for us to customise the GraphQLResolveInfo data[1], but I haven't figured out a nice way to pass some data to ExecutionContext.build without customising the execute function here:
|
context = execution_context_class.build( |
|
schema, |
|
document, |
|
root_value, |
|
context_value, |
|
variable_values, |
|
operation_name, |
|
field_resolver, |
|
type_resolver, |
|
subscribe_field_resolver, |
|
middleware, |
|
is_awaitable, |
|
) |
Is there a better alternative for something like this?
[1] We also have a custom version of info, so customising the ExecutionContext class will help with that too :D
Hi there 😊
I was looking at this PR on Strawberry: strawberry-graphql/strawberry#3461
and I was wondering if there's a nicer to pass the input extensions data around, so I stumbled on the ExecutionContext class which can be useful for us to customise the GraphQLResolveInfo data[1], but I haven't figured out a nice way to pass some data to ExecutionContext.build without customising the execute function here:
graphql-core/src/graphql/execution/execute.py
Lines 1844 to 1856 in 9dcf25e
Is there a better alternative for something like this?
[1] We also have a custom version of info, so customising the ExecutionContext class will help with that too :D