GithubHelp home page GithubHelp logo

Proposal: deep sorting about graphql HOT 9 OPEN

neo4j avatar neo4j commented on September 1, 2024 5
Proposal: deep sorting

from graphql.

Comments (9)

darrellwarde avatar darrellwarde commented on September 1, 2024 1

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.

from graphql.

darrellwarde avatar darrellwarde commented on September 1, 2024 1

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! 🔥

from graphql.

rcbevans avatar rcbevans commented on September 1, 2024 1

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.

from graphql.

Andy2003 avatar Andy2003 commented on September 1, 2024

@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.

from graphql.

morningcloud avatar morningcloud commented on September 1, 2024

Following this issue for updates after posting to the discord channel. Looking forward to when this feature will be addressed.

from graphql.

morningcloud avatar morningcloud commented on September 1, 2024

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

from graphql.

darrellwarde avatar darrellwarde commented on September 1, 2024

Definitely not abandoned, just a lot more to do first (updateOrCreate, root-level Interface and Union queries, etc.). And we're also more likely to implement sorting by aggregations first, as that has more utility than this. So don't expect anything too soon on this!

from graphql.

MichaelCDormann avatar MichaelCDormann commented on September 1, 2024

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.

from graphql.

 avatar commented on September 1, 2024

Hi @darrellwarde
Just wanted to know if this feature is still being developed?

We have a use case where we have to sort based on the properties of nested node in rich relationship.
It would be great if we have this feature.
Thanks

from graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.