0

I'm writing this query at contentful's graphql and I need to filter the DestinationsSubcategories's title Field. I was trying to add a where parameter but it's not working.

query {
  advisorsCollection(where: { showOnAdvisorsPage: true }, limit: 100, skip: 0) {
    total
    items {
      title
      slug
      advisorVariant
      image {
        url
        description
      }
      expertise
      categoriesCollection(limit: 5) {
        items {
          ... on DestinationsSubcategories {
            title
          }
        }
      }
    }
  }
}

I'll really appreciate it any help. Thanks!

I was trying to add a where parameter but it's refering to the first items.title.

query {
  advisorsCollection(where: { showOnAdvisorsPage: true, title_contains: "Italy" }, limit: 100, skip: 0) {
    total
    items {
      title
      slug
      advisorVariant
      image {
        url
        description
      }
      expertise
      categoriesCollection(limit: 5) {
        items {
          ... on DestinationsSubcategories {
            title
          }
        }
      }
    }
  }
}

I need to query the DestinationsSubcategories title field.

0 Answers0