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
}
}
}
`