We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the Schema:
type Movie { title: String publishedBy: Publisher @relation(name: "PUBLISHED_BY", direction: OUT) } type Publisher { name: ID! }
The augmentation would be:
type Query { movie(sort: [_MovieSorting!]): [Movie!]! } enum SortDirection{ asc, desc, } input _MovieSorting { title: SortDirection publishedBy: [_PublisherSorting!] } input _PublisherSorting { name: SortDirection }
So a user can get all movies ordered by Publisher.name and title by calling
Publisher.name
title
query { movie(sort: [{publishedBy: [{name: desc}]}, {title: asc}]) { title } }
which results in this query
MATCH (m:Movie) WITH m ORDER BY head([(m)-[:PUBLISHED_BY]->(p:Publisher) | p.name]) DESC, m.name ASC RETURN m{.title}
This sorting should be possible for all 1..1 relations. This is related to #3 since the input of sorting will no longer be an enum.
The text was updated successfully, but these errors were encountered:
Break it up into 2 steps
question: how do we manage the backwards compatibility if any.
Sorry, something went wrong.
we can generate 2 arguments:
Would need to align with neo4j-graphql-js
perhaps we can call the new field: sortBy or sort
/cc @johnymontana
Break it up into 2 steps input type for sorting optionally deep sorting
for 1. I created issue #196
No branches or pull requests
Given the Schema:
The augmentation would be:
So a user can get all movies ordered by
Publisher.name
andtitle
by callingwhich results in this query
This sorting should be possible for all 1..1 relations.
This is related to #3 since the input of sorting will no longer be an enum.
The text was updated successfully, but these errors were encountered: