Skip to content

Commit 67981cb

Browse files
committed
Fix npe when input object field has a wrong name.
1 parent e8e6e43 commit 67981cb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/graphql/validation/TraversalContext.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ private void enterImpl(ObjectField objectField) {
127127
GraphQLInputType inputType = null;
128128
if (objectType instanceof GraphQLInputObjectType) {
129129
GraphQLInputObjectField inputField = ((GraphQLInputObjectType) objectType).getField(objectField.getName());
130-
inputType = inputField.getType();
130+
if (inputField != null)
131+
inputType = inputField.getType();
131132
}
132133
addInputType(inputType);
133134
}

0 commit comments

Comments
 (0)