-
Notifications
You must be signed in to change notification settings - Fork 299
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
QueryDslDataFetcher and QueryByExampleDataFetcher return empty property selection list for cursor connection #723
Comments
Thanks for bringing this up. Small typo perhaps, in the sample, the query should be |
(yes, it was a typo. copied from my larger example)
|
That makes sense. I'll have a closer look soon, with 1.2.1 coming up next week. |
No hurry, I don't even know if the other Spring Data modules respect filtering properties for entities/non-projections. I mean it's not a bug per se but could at least help us to optimise the query and only fetch the data that is requested (as it already happens for all other parts of SDN). |
There is a fix for this now. I've also added a test, so it should work as expected. |
Thank you very much. Cannot wait to try this out (with the release version). |
While I am doing the last steps to also bring complete scrolling support for Spring GraphQL into Spring Data Neo4j, I came across this line:
spring-graphql/spring-graphql/src/main/java/org/springframework/graphql/data/query/QueryByExampleDataFetcher.java
Line 695 in 729d538
Given a (partial) schema like this:
and an actual query like this:
The selection set of course contains the requested paths that does not match up with the entity (
Movie
) at all. In fact the paths look like MovieConnection.edges/MovieEdge.node/Movie.actors . As a consequencebuildPropertyPaths
will return 0 properties.In Spring Data Neo4j we process those properties to reduce the amount of data and related nodes/entities that gets loaded. But in this case we can only return "everything" because there is no filter in place.
Would it be possible to make the method
buildPropertyPaths
resp. the underlying methods aware of the cursor connection? Or issue another subsequent call before execution with this meta-information (I am aware that this would require a new method in Spring Data Commons)?The text was updated successfully, but these errors were encountered: