Skip to content

Returned null on DataFetchingEnvironment .getUser() in Mutation class #4

Open
@AliceSum

Description

@AliceSum

AuthContext context = env.getContext(); Link newLink = new Link(url, description, context.getUser().getId());
I do not get null on context varible, but I get a null on context.getUser()

code:https://github.com/howtographql/graphql-java/blob/master/src/main/java/com/howtographql/hackernews/Mutation.java
or my code:
https://github.com/JonathanSum/myOwnJavaGraphqlStarterKit/blob/master/src/main/java/com/howtographql/hackernews/Mutation.java

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