v8-archive
v8-archive copied to clipboard
Add ability to sort by field in GraphQL
I don't know if it's something I just can't find, but I haven't been able to find a way to sort my query by fields on GraphQL
I'm building a simple blog, and currently I have to manually order the posts each time using the sort field. I'd like to have posts ordered so that most recent is first. I may be overcomplicating things.
Currently I have something like:
posts {
data {
id
created_on
sort_order
title
}
}
but I'd like to be able to order like so:
posts(sort:{ order: DESC, fields: created_on }) {
data {
id
created_on
sort_order
title
}
}
Is this possible? Does it already exist and I just can't figure out how to do it?
I highly support this even though I know Directus v9 is in the pipes and might bring this functionality alive.
Any updates on this?
Absolutely a MUST. I can't even sort blog posts by date of creation and this a very basic feature.
Are there any updates on this?
We will be including this in the upcoming v9 release, but the core team will not be adding this to v8.