Skip to content

Commit 5b3a0d4

Browse files
jangculunbbakerman
authored andcommitted
Add operationName condition
if operationName is blank, previous code generate an exception. I add code to check blank.
1 parent f2485e1 commit 5b3a0d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/graphql/language/NodeUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static GetOperationResult getOperation(Document document, String operatio
7777
}
7878
OperationDefinition operation;
7979

80-
if (operationName == null) {
80+
if (operationName == null || operationName == "") {
8181
operation = operationsByName.values().iterator().next();
8282
} else {
8383
operation = operationsByName.get(operationName);

0 commit comments

Comments
 (0)