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
If you return Page<?>(spring data) from @MutationMapping and use Connection autogeneration. Then a GraphQL error occurs.
The field at path '/createProduct/edges' was declared as a non null type, but the code involved in retrieving
data has wrongly returned a null value. The graphql specification requires that the parent field be set to null,
or if that is non nullable that it bubble up null to its parent and so on.
The non-nullable type is '[ProductEdge]' within parent type 'ProductConnection'
But if you use @QueryMapping instead of @MutationMapping, then there is no such error.
spring boot 3.1.0
spring-graphql 1.2.0
graphql-java 20.2
OpenJDK 17
To demonstrate, I made a simple example: Demo project
If you return Page<?>(spring data) from @MutationMapping and use Connection autogeneration. Then a GraphQL error occurs.
But if you use @QueryMapping instead of @MutationMapping, then there is no such error.
spring boot 3.1.0
spring-graphql 1.2.0
graphql-java 20.2
OpenJDK 17
To demonstrate, I made a simple example: Demo project
Example of a request with an error:
Query without error:
Both requests return the same data.
Controller:
Schema:
The text was updated successfully, but these errors were encountered: