orderBy multiple fields
See original GitHub issueI’m just trying to construct a query with multiple ordering fields (I’m using the django example btw).
Here’s what I have right now …
{
allCategories(orderBy: "name")
edges {
node {
id
name
slug
}
}
}
This works fine, but I like to order by multiple fields …
allCategories(orderBy: "name, slug")
allCategories(orderBy: ["name", "slug"])
Am I using the wrong syntax or is this not even possible?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to Order By Two Columns in SQL? - LearnSQL.com
After the ORDER BY keyword, add the name of the column by which you'd like to sort records first (in our example, salary)....
Read more >SQL multiple column ordering - Stack Overflow
After the ORDER BY keyword, add the name of the column by which you'd like to sort records first (in our example, salary)....
Read more >SQL Server ORDER BY clause By Practical Examples
First, you specify a column name or an expression on which to sort the result set of the query. If you specify multiple...
Read more >SQL - Multiple Column Ordering - GeeksforGeeks
It is used to sort the result-set in ascending or descending order. It sorts the records in ascending order by default. To sort...
Read more >Sorting on multiple columns - IBM
You can also ORDER BY two or more columns, which creates a nested sort . The default is still ascending, and the column...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Graphene doesn’t support that yet, it might be a good case to add!
I’m using this resolve function to handle a list of orderBy.