DEV Community

Cover image for how to filter in the dynamic zone in strapi using graphql?
Jackson Kasi
Jackson Kasi

Posted on

how to filter in the dynamic zone in strapi using graphql?

hello, dev's. i need help in strapi. if any one know please help me! thanks 🙂

query GetPosts($datelte: Date!, $dategte: Date!, $searchkey: String) {
  posts(filters: { effectiveDate: { lte: $datelte, gte: $dategte } }) {
    data {
      attributes {
        effectiveDate
        contentSections {
        ... on ComponentElementsEvents {
          title
            }
        }
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

here how can I add a search filter by searchkey for the title?

title it's inside a dynamic zone.

dynamic zone image
filed inside dynamic zone filter

Top comments (0)