-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Configure support for GraphQL pagination and sorting #34677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey @rstoyanchev - here's a first draft for the pagination and sorting support in Spring Boot. Is that what you had in mind? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks straight forward, just one comment below. In addition, I think I'll make the CursorStrategy
detected in AnnotatedControllerConfigurer
for consistency with the SortStrategy
.
...e/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java
Show resolved
Hide resolved
This commit auto-configures the new pagination and sorting support for Spring for GraphQL, if Spring Data is available. The `GraphQlAutoConfiguration` now contributes a `CursorStrategy` bean that is used to set up the pagination and sorting data fetching infrastructure. This commit also configures by default a `ConnectionTypeDefinitionConfigurer` that automatically detects `*Connection` types and contributes the relevant schema definitions according to the Relay spec. Closes spring-projectsgh-34630
I've just updated my PR with the latest comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @rstoyanchev, unless you think some further tweaks are required, we'll try to get this into Thursday's M2 release.
Looks good to me as well. Thanks! |
This commit auto-configures the new pagination and sorting support for Spring for GraphQL, if Spring Data is available. The `GraphQlAutoConfiguration` now contributes a `CursorStrategy` bean that is used to set up the pagination and sorting data fetching infrastructure. This commit also configures by default a `ConnectionTypeDefinitionConfigurer` that automatically detects `*Connection` types and contributes the relevant schema definitions according to the Relay spec. See gh-34677
This commit auto-configures the new pagination and sorting support for
Spring for GraphQL, if Spring Data is available.
The
GraphQlAutoConfiguration
now contributes aCursorStrategy
beanthat is used to set up the pagination and sorting data fetching
infrastructure.
This commit also configures by default a
ConnectionTypeDefinitionConfigurer
that automatically detects*Connection
types and contributes the relevant schema definitionsaccording to the Relay spec.
Closes gh-34630