# How do i fetch a content relationship in a group with all the data

**URL:** <https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250>\
**Category:** Developing with Prismic\
**Tags:** reactjs, javascript\
**Created:** [October 6, 2023, 4:39pm UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250 "2023-10-06T16:39:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.berghahn](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@justin.berghahn](https://community.prismic.io/u/justin.berghahn)\
**Post date:** [October 6, 2023, 4:39pm UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250/1 "2023-10-06T16:39:35Z")

</div>

Hello, i was wondering how i fetch the data of a content relationship when its in a group. I have a homepage and with conten relationship in a group i show some of the blogs. I want to fetch the title for examle of the blog. I now have that it shows some data, but not everything.

 ![afbeelding](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/7/7f93979a98ef9069822d5511df1b687e9783673d.png)  
 ![afbeelding](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/f/f1b22c7decb43c3c977b8e3ff66f1b8adfa537e9.png)

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [October 9, 2023, 3:39pm UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250/3 "2023-10-09T15:39:56Z")

</div>

Hi @justin.berghahn ,

Welcome to the community!

To get data from linked documents, you'll have to use GraphQuery, our query option where you define the field you want:

> **[GraphQuery](https://prismic.io/docs/graphquery-rest-api)**
>
> This shows how to use the Prismic GraphQuery query option to retrieve certain fields and retrieve content from linked documents.

Let me know if you have any questions.

Thanks.

---

<div class="post-metadata">

**Author:** ![justin.berghahn](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@justin.berghahn](https://community.prismic.io/u/justin.berghahn)\
**Post date:** [October 9, 2023, 4:56pm UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250/4 "2023-10-09T16:56:59Z")

</div>

Hi Phil, i'm not using GraphQuery.

 ![afbeelding](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/f/f5c133af80c008d0d71a72cda4854ed191e70667.png)  
 ![afbeelding](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/b/b85906eaaa60752e532d908a99fd19cf48aacda9.png)

This is how i fetch.

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [October 10, 2023, 10:21am UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250/5 "2023-10-10T10:21:39Z")

</div>

Yes, but you will need to to get the linked documents info. GraphQuery is not GraphQL. GraphQuery uses a GraphQL-like syntax. However, GraphQuery doesn’t include some GraphQL features such as named queries or introspection.

You might query like this then:

```auto
import * as prismic from "@prismicio/client"

const client = prismic.createClient("example-prismic-repo")

async function init() {
  const response = await client.getAllByType("blog", {
    graphQuery: `{
      blog {
        author_link {
          ...on author {
            author_name
          }
        }
      }
    }`
  })

  return response
}

init()

```

---

<div class="post-metadata">

**Author:** ![justin.berghahn](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@justin.berghahn](https://community.prismic.io/u/justin.berghahn)\
**Post date:** [October 10, 2023, 9:25pm UTC](https://community.prismic.io/t/how-do-i-fetch-a-content-relationship-in-a-group-with-all-the-data/14250/8 "2023-10-10T21:25:46Z")

</div>

Okay thank you, i'll check it now!
