1

How do I sort in GraphQL using case insensitive? Currently I get all entries with uppercase before lowercase. Is there a way to ignore titalcase? My query looks like this:

{
  allToolsJson(sort: {order: ASC, fields: [name]}) {
    edges {
      node {
        name
      }
    }
  }
}
marcobiedermann
  • 4,317
  • 3
  • 24
  • 37
  • 1
    The question is not specific to GraphQL but rather to database queries. If you paste the body of the `resolve` function on the `allToolsJson` field (or wherever you query the database), we might be able to help. – Petr Bela Jan 08 '18 at 16:28
  • So you mean, sorting is not part of the GraphQL spec? Do I have to add this on my application layer to add this filter to my query? – marcobiedermann Jan 12 '18 at 17:30
  • Correct. https://github.com/graphql/graphql-js/issues/640#issuecomment-268386839 – Petr Bela Jan 12 '18 at 22:07

0 Answers0