cassandra-data-apis
cassandra-data-apis copied to clipboard
Order by query argument usability improvements
The issue with the current graphql order by argument is that is can be hard to programmatically generate because it contains a string concatenation. Users will likely know what field they want to order so we can move this to a runtime consideration. This will also reduce the amount of code generated for a client.
From:
enum CartOrder {
userName_DESC
cartId_ASC
cartId_DESC
quantity_ASC
quantity_DESC
userId_ASC
userId_DESC
userName_ASC
}
Could be changed to a field + direction. e.g: To:
input OrderByInput {
direction: OrderByDirection!
field: String!
}