Skip to content

Commit

Permalink
Do not require variables to be non null but initialize empty (fix #168)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliemansm committed Apr 21, 2019
1 parent 0c07667 commit bf6e8fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/graphql/servlet/internal/GraphQLRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* @author Andrew Potter
Expand Down Expand Up @@ -41,7 +40,9 @@ public Map<String, Object> getVariables() {
}

public void setVariables(Map<String, Object> variables) {
this.variables = Objects.requireNonNull(variables);
if (variables != null) {
this.variables = variables;
}
}

public String getOperationName() {
Expand Down

0 comments on commit bf6e8fe

Please sign in to comment.