Skip to content

How to pass additional information to GraphQLResolveInfo #226

Open
@patrick91

Description

@patrick91

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions