Skip to content

Commit bf6e8fe

Browse files
committed
Do not require variables to be non null but initialize empty (fix #168)
1 parent 0c07667 commit bf6e8fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/graphql/servlet/internal/GraphQLRequest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import java.util.HashMap;
77
import java.util.Map;
8-
import java.util.Objects;
98

109
/**
1110
* @author Andrew Potter
@@ -41,7 +40,9 @@ public Map<String, Object> getVariables() {
4140
}
4241

4342
public void setVariables(Map<String, Object> variables) {
44-
this.variables = Objects.requireNonNull(variables);
43+
if (variables != null) {
44+
this.variables = variables;
45+
}
4546
}
4647

4748
public String getOperationName() {

0 commit comments

Comments
 (0)