GraphQuery and group of items

Hi,

I used Prismic couple years ago. I wanted to use it again.
I set up a new project using Nuxt and I'm trying to query a page created from the slice machine.

I succeed to get the document, a simple for now. Inside this document I have one slice contained a group of Content Relationships. What I want to achieve is getting data about each item in the group of items

Here is my query :

{
  homepage {
    slices {
      ...on questions_frequentes {
        variation {
          ...on default {
            primary {
             title
            }
            items {
              ...itemsFields
            }
          }
        }
      }
    }
  }
}

The items field looks like:

[
  { faq: { id: 'xxxxxx', ...otherFields } },
  { faq: { id: 'xxxxxx', ...otherFields } },
]

I do not know how to fetch fields of each faq item to retrieve the data I want to display.

Do you know what I am missing in the graph query?

If it can help, this is the endpoint of the project: https://bleudeterre.cdn.prismic.io/api/v2

Thank you!

Hello Clement,

Welcome to the Prismic community, and thanks for reaching out to us.

You have to specify the API ID of the Content Relationship field to retrieve content from the linked documents. Your query will be something like this:

graphQuery={
  homepage {
    slices {
      ...on questions_frequentes {
        variation {
          ...on default {
            items {
             faq {
             ...on faq {
               ...faqFields
             }
            }
            }
          }
        }
      }
    }
  }
}

Let me know if you have any further questions.

Thanks,
Priyanka