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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❀️