Skip to content

Cannot access request within mutation #2

@adamcharnock

Description

@adamcharnock

I am creating a new model within a mutation. I would like to set the model's created_by field to point to the current user (using request.user). However, AFAIK the request object is not available within a mutation's mutate_and_get_payload() method.

Note: It is entirely possible that I'm going about this the wrong way, I'm still new to GraphQL.

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