lionixevolve / GraphQLSuiteCRM

GraphQL SuiteCRM - Integrate with SuiteCRM using GraphQL
19 stars 2 forks source link

How to get records by descending order? #8

Closed ankitpatelinitio closed 5 years ago

ankitpatelinitio commented 5 years ago

How to get records by descending order from graphql query. I tried to use order parameter with the field but it gave me records by ascending orders.

Thanks

mrbarletta commented 5 years ago

Hi @ankitpatelinitio - just add DESC to the order field

query {
  contacts(order:"first_name desc"){
   first_name
  }
}

image

ankitpatelinitio commented 5 years ago

Thanks, @mrbarletta , I tried this solution and it's working fine.