Retrieve Group content

This page will show you how to retrieve content/fields from within a group field.


A simple example query

Here is a simple example that retrieves content from a Group field. We are querying the content type book_listing which has a Group field with the API ID of books. This group field contains the following fields:

  • A Title field with the API ID book_name
  • A Rich Text field with the API ID book_description
Copy
query {
  allBook_listings {
    edges {
      node {
        books {
          book_name
          book_description
        }
      }
    }
  }
}

Adding content fields in the Group

As you can see in the example above, you simply need to add the fields inside the group as you would add them anywhere else. Here we just need to specify the API ID of the Rich Text and Title fields. You may need to specify other field types differently. For example, here is how to retrieve content from a Link field.


Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.