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
Return null values from Connection visitor when expected
Prior to this commit, a schema declaring a `BookConnection` nullable
type would decorate the relevant data fetcher and return an
`EMPTY_CONNECTION` value (a full Connection instance with empty nodes
and edges) if the original DataFetcher returns `null`.
This is unexpected for applications because the type is declared as
nullable in the schema and the application returns a `null` value.
This commit ensures that `EMPTY_CONNECTION` is only returned as a value
if the Connection type is marked as non nullable, `BookConnection!`.
This change should only affect applications with custom pagination
support, as Spring Data never returns `null` for empty pages.
Closesgh-1295
Copy file name to clipboardExpand all lines: spring-graphql/src/test/java/org/springframework/graphql/data/pagination/ConnectionFieldTypeVisitorTests.java
0 commit comments