Skip to content

Commit 1ae68e5

Browse files
committed
fix: correctly retrieve operation from request body
1 parent 6068e64 commit 1ae68e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-graphql/src/main/java/org/springframework/graphql/server/WebGraphQlRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ private static String getQuery(Map<String, Object> body) {
105105

106106
@Nullable
107107
private static String getOperation(Map<String, Object> body) {
108-
Object value = body.get("operation");
108+
Object value = body.get("operationName");
109109
if (value != null && !(value instanceof String)) {
110-
throw new ServerWebInputException("Invalid value for 'operation'");
110+
throw new ServerWebInputException("Invalid value for 'operationName'");
111111
}
112112
return (String) value;
113113
}

0 commit comments

Comments
 (0)