0

I am currently working on trying out the Sitecore GraphQL Query where I just get all the items of a specific location in the Sitecore Tree. However, I may need to filter the item results based on a particular Field Value. Is it possible to do this on the GraphQL in Connected mode?

3

You can use an index search and filter whatever, Use somethings like this:

{
  search(
    fieldsEqual:[{name:"title", value:"Sit*" }] rootItem:"/sitecore/content"
        ) {
    results {
      items {
        item {
          id
          name
          path
          url
          field(name  : "title") {
           title: value
          }
        }
      }
      totalCount
    }
  }
}

This is searching, filtering on Title field in the tree below rootItem. For only searching in a specific location you can filter on parent id. somethings like this:

fieldsEqual:[{name:"title", value:"Sit*"} ,{name:"_parent",value:"0de95ae441ab4d019eb067441b7c2450"}]

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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