Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass additional information to GraphQLResolveInfo #226

Open
patrick91 opened this issue Aug 27, 2024 · 0 comments
Open

How to pass additional information to GraphQLResolveInfo #226

patrick91 opened this issue Aug 27, 2024 · 0 comments

Comments

@patrick91
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant