Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/graphql/schema/DataFetchingEnvironmentImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import com.google.common.collect.ImmutableMap;
import graphql.Assert;
import graphql.GraphQLContext;
import graphql.Internal;
import graphql.collect.ImmutableKit;
Expand Down Expand Up @@ -60,7 +61,7 @@ private DataFetchingEnvironmentImpl(Builder builder) {
this.source = builder.source;
this.arguments = builder.arguments == null ? ImmutableKit::emptyMap : builder.arguments;
this.context = builder.context;
this.graphQLContext = builder.graphQLContext;
this.graphQLContext = Assert.assertNotNull(builder.graphQLContext);
this.localContext = builder.localContext;
this.root = builder.root;
this.fieldDefinition = builder.fieldDefinition;
Expand Down Expand Up @@ -266,7 +267,7 @@ public static class Builder {

private Object source;
private Object context;
private GraphQLContext graphQLContext;
private GraphQLContext graphQLContext = GraphQLContext.newContext().build();
private Object localContext;
private Object root;
private GraphQLFieldDefinition fieldDefinition;
Expand Down