1

I have been using Contenfull to create a custom app. Now the problem that I'm having is I can not see how can I query a nested collection

I have the following entry

query cfPageList(
  $contentfulLocale: String
  $entryId: String!
  $preview: Boolean = false
) {
  cfPageList(id: $entryId, locale: $contentfulLocale, preview: $preview) {
    sys {
      id
    }
    categoryListCollection {
      options: items {
        value: value
        label: itemName
        disabled: disabled
      }
    }
  }
}

I would like to query all the CategoryList that have disabled to false

I tried with cfPageList(id: $entryId, locale: $contentfulLocale, preview: $preview, where: { disabled: false })

Tried with

cfPageList(id: $entryId, locale: $contentfulLocale, preview: $preview, where: { categoryListCollection: { disabled: false } })

But none of it works, do any of you guys have any idea how it should work, or if it is possible to do it with Contentfull.

Loki
  • 1,064
  • 2
  • 26
  • 55

1 Answers1

-1

You should try filter items

categoryListCollection {
  options: items(where: {disabled: false}) {
    value: value
    lebel: itemName
    disabled: disabled
  }
}
  • or
categoryListCollection(where: {disabled: false}) {
  options: items {
    value: value
    lebel: itemName
    disabled: disabled
  }
}
Dreamy Player
  • 556
  • 5
  • 18