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
First off, I want to say Thank you! for building Spring GraphQL I like the project and where it is headed! :)
If you take a look at the spring-graphql/samples/webmvc-http and you take the schema for the query defined as.
type Query {
artifactRepositories : [ArtifactRepository]
}
And you change this to
type Query {
artifactRepositories : [ArtifactRepository!]
}
The query will no longer return any results since the data fetcher will not be found anymore.
This appears to be a problem in org.springframework.graphql.data.query.AutoRegistrationRuntimeWiringConfigurer Line 87 is not unwrapping NotNull types.
Unless this was the desired result. If that is the case It would be nice to update the docs with a warning. I chased my tail for a while because I could not get any results. Since I had defined my queries with non null result types. Which I think is semantically correct for spring data.
The text was updated successfully, but these errors were encountered:
rstoyanchev
changed the title
@GraphQlRepository does not work properly if the GraphQL schema defines non null type.
Auto-registration of @GraphQlRepository does not work for output type defined as non-null
Jul 8, 2022
First off, I want to say Thank you! for building Spring GraphQL I like the project and where it is headed! :)
If you take a look at the spring-graphql/samples/webmvc-http and you take the schema for the query defined as.
And you change this to
The query will no longer return any results since the data fetcher will not be found anymore.
This appears to be a problem in
org.springframework.graphql.data.query.AutoRegistrationRuntimeWiringConfigurer
Line 87 is not unwrappingNotNull
types.Unless this was the desired result. If that is the case It would be nice to update the docs with a warning. I chased my tail for a while because I could not get any results. Since I had defined my queries with non null result types. Which I think is semantically correct for spring data.
The text was updated successfully, but these errors were encountered: