Skip to content

GraphQLContext: No way to access the underlying map #3363

@salvoilmiosi

Description

@salvoilmiosi

Hello, I would like a way to access the underlying ConcurrentMap in an instance of GraphQLContext in order to call the computeIfAbsent method. Right now there is no way to check if an element is present in the context and, if not, calculate its value, set it and return it, atomically but I have to call get() and then put(), risking potential data races. The GraphQLContext should at least add a computeIfAbsent method.

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