Skip to content
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

GraphQlRepository with reactive repository and pagination not working #1609

Closed
chrisbuettgen opened this issue Sep 13, 2023 · 2 comments
Closed
Assignees
Labels
type: enhancement A general enhancement

Comments

@chrisbuettgen
Copy link

Hi there,
tried to get my feet wet with Spring for GraphQL and wanted to try out @GraphQlRepository together with an R2DBC repo, Pagination and "~Connection" types as in the documentation.

Strange thing is the query execution always ends with an Exception:

java.lang.UnsupportedOperationException: Limit not supported
	at org.springframework.data.repository.query.FluentQuery$ReactiveFluentQuery.limit(FluentQuery.java:227) ~[spring-data-commons-3.1.3.jar:3.1.3]
	at org.springframework.graphql.data.query.QueryByExampleDataFetcher$ReactiveScrollableEntityFetcher.lambda$get$0(QueryByExampleDataFetcher.java:950) ~[spring-graphql-1.2.2.jar:1.2.2]
[...]

Looking at the source code I cannot find an implementation of FluentQuery.limit(int limit) which does not throw an UnsupportedOperationException.

Am I missing something?

Find the attached source code with a Unit test to illustrate the problem. Running the application and using Graphiql should also lead to the error.
graphql-kotlin.zip

Maybe this issue is remotely related to #1605

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 13, 2023
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 13, 2023
@mp911de
Copy link
Member

mp911de commented Sep 13, 2023

Good catch. That's a bug on our side.

@mp911de mp911de self-assigned this Sep 13, 2023
@mp911de
Copy link
Member

mp911de commented Sep 13, 2023

One more thing, GraphQL uses ScrollPosition. While we're going to fix the limit issue short term, support for #1605 will take a while.

mp911de added a commit that referenced this issue Sep 14, 2023
@mp911de mp911de added type: enhancement A general enhancement and removed type: bug A general bug labels Sep 14, 2023
@mp911de mp911de added this to the 3.1.4 (2023.0.4) milestone Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants