Skip to content

Shared use of global and local context #2357

@rstoyanchev

Description

@rstoyanchev

Currently the global and local context are exposed as an opaque Object which makes it a challenge for sharing across frameworks or components from different parties.

It would be great if GraphQL Java could help establish a common understanding of what the context type is as a generic container such as graphql.GraphQLContext so that different parties can agree on how to access or update it. Of course this would require awareness the context is a shared container and therefore keys need to be reasonably unique, or perhaps to use a single (unique) root key with a sub-map underneath, but this shouldn't be much of a challenge.

Given the widespread use of the existing context() and localContext(), these could be alternative methods that provide a migration path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions