DEV Community

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

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)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free โ†’