-
Notifications
You must be signed in to change notification settings - Fork 148
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
Proposal: deep sorting #145
Comments
This is great @Andy2003, thanks for the proposal. Today is the deadline for us to propose new pieces of work for the next development phase, so we sadly haven't got time to fully elaborate this in time. However, I have proposed refactoring from our current enum sort types to object sort types better aligned with the Java library, which will put us in a much better position to implement this feature in the future, without making any breaking changes. |
@darrellwarde I'm currently scanning the API to find the work to do, to align the java-version. I think, now is a good point in time to optimize the API. Sad to hear that the Deadline is so close. |
For sure, for me it's very much about getting as many breaking changes as possible out of the way before we release version 1.0.0. For clean additions of functionality, not so much of a problem, but this change would require underlying changes to enable it. At the very least, we can get the underlying change requirements out of the way, and then we can cleanly add it later without breaking any schemas out in the wild. 🙂 Yes, there is a bit of a deadline, but we often have time to squeeze other bits of work in, so please don't slow down on raising these kinds of issues! 🔥 |
Hey @darrellwarde, any update on this? I have many examples of places where I need to be able to sort results based on connected edges, for example, sort posts by the number of comments, or sort author by most recent post. I attempted to work around the issue by adding a virtual field backed by a cypher query to return the result to sort on, hoping the GraphQL library would generate an order by augmentation for the property, but it seems it doesn't for fields backed by Cypher. In some cases I'm able to mitigate by denormalizing the data and storing the count on the node as well, but this opens the opportunity for the property to be wrong which isn't great. |
Following this issue for updates after posting to the discord channel. Looking forward to when this feature will be addressed. |
Hi @darrellwarde, are the sorting-related features abandoned or is there any plan to proceed with the Pagination and Sorting 2.0 milestone? Hi @rcbevans, I am interested to know if you managed to apply some reasonable alternative approaches to support the use case you mentioned for sorting |
Definitely not abandoned, just a lot more to do first ( |
Hi @darrellwarde, just wondering if this is still not abandoned. This would be a great feature to be able to use. Currently if I need sorting on related node properties I have to give up on pagination, get all results, and sort on the client side. Curious if anyone has any better solutions. |
Hi @darrellwarde We have a use case where we have to sort based on the properties of nested node in rich relationship. |
As explained in neo4j-graphql/neo4j-graphql-java#64 I would suggest to change the way sorting is defined.
The text was updated successfully, but these errors were encountered: