How can I query/map a repeatable group field?

Hi, I'm trying to query a repeatable group field in my project. I've made a "Single" type page with a repeatable group called FAQ. I'm trying to query it on multiple pages. Appreciate any help!

    {faqs.nodes.map(faq => (
      <>
      <h1>{faq.data.group.question.text}</h1>
      </>
    ))}

export const pageQuery = graphql`
  query PageBySlug($uid: String!) {
    page: prismicPage(uid: { eq: $uid }) {
      id
      uid
      data {
        page_description {
          text
        }
        page_title {
          text
        }
      }
    }
    events: allPrismicEvent {
      nodes {
        data {
          title {
            text
          }
          text {
            text
          }
        }
        uid
        id
      }
    }
    faqs: allPrismicFaq {
      nodes {
        data {
          title {
            text
          }
          group {
            question {
              text
            }
            answer {
              text
            }
          }
        }
        id
        uid
      }
    }
  }
`

Hi Andrew,

Welcome to the Prismic community.

As far as I understand you are trying to implement FAQ to use it in your application, and it seems that you are using GraphQL to query your content.
What I can recommend in this case is to use slices instead of groups, you can get inspired by this example in GraphQl.

Can you please tell me in what language you are trying to implement that?

Looking forward to your reply,
Fares

This is being tracked as an open feature request.

This issue has been closed due to inactivity. Flag to reopen.