Skip to content

GraphQL resolution context #354

Closed
Closed
@calebmer

Description

@calebmer

Does this library have a way to store context when resolving a GraphQL query?

For example, I'd like to keep a database connection variable in a context value for per request optimizations.

Ideally the context would be dependent on nesting so if I had one field to authenticate a user (asUser(token: …) { … } for example) I could put the token in the context and nested resolves would recieve it.

I know of the source parameter for resolves but is there a way to take this a step further?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions