You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's suppose you have defined a type called TestObject:
typeTestObject {
id: ID!name: String
}
And for some reason, you mistyped the name property or forgot to define a getter method for name, which is private. The Spring GraphQL Framework will generate the following error if property spring.graphql.schema.inspection.enabled: true:
Caused by: java.lang.IllegalArgumentException: Method must not be null
at org.springframework.util.Assert.notNull(Assert.java:172)
at org.springframework.core.ResolvableType.forMethodReturnType(ResolvableType.java:1272)
at org.springframework.graphql.execution.SchemaMappingInspector.checkFieldsContainer(SchemaMappingInspector.java:173)
at org.springframework.graphql.execution.SchemaMappingInspector.checkField(SchemaMappingInspector.java:235)
And this error does not show much about the problem. It would be nice if we instead of calling:
We could call a function that translates this IllegalArgumentException into a more friendly error message, like: "Type: TestObject, property: name does not have a reader method defined!"
Thanks guys.
The text was updated successfully, but these errors were encountered:
Version: Spring GraphQL 1.3.1
Let's suppose you have defined a type called TestObject:
And for some reason, you mistyped the
name
property or forgot to define a getter method forname
, which is private. The Spring GraphQL Framework will generate the following error if propertyspring.graphql.schema.inspection.enabled: true
:And this error does not show much about the problem. It would be nice if we instead of calling:
We could call a function that translates this IllegalArgumentException into a more friendly error message, like: "Type: TestObject, property: name does not have a reader method defined!"
Thanks guys.
The text was updated successfully, but these errors were encountered: