1

I am trying to get the sortorder value from Sitecore GraphQL and it is not recognizing the field. Any config needs to be updated ? Am i missing some thing here?

3

You can use this GraphQL query to get all Fields of an Item:

query DemoQuery($contextItem: String!) {
  contextItem: item(path: $contextItem) {
     fields  {
        name
        value
     }
  }
}

You can use somethings like this to get the __sortorder Field:

query DemoQuery($contextItem: String!) {
  contextItem: item(path: $contextItem) {
    id
    field(name  : "__sortorder") {
       sortorder: value
      }
  }
}
  • Thank you. Perfect answer. – Hussain Mar 11 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.