cassandra-data-apis icon indicating copy to clipboard operation
cassandra-data-apis copied to clipboard

Order by query argument usability improvements

Open henneberger opened this issue 5 years ago • 0 comments

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

henneberger avatar Jun 09 '20 00:06 henneberger