# GraphQuery question

**URL:** <https://community.prismic.io/t/graphquery-question/1479>\
**Category:** Developing with Prismic\
**Created:** [August 8, 2020, 8:58pm UTC](https://community.prismic.io/t/graphquery-question/1479 "2020-08-08T20:58:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbenniks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tbenniks/32/200_2.png) [@tbenniks](https://community.prismic.io/u/tbenniks)\
**Post date:** [August 8, 2020, 8:58pm UTC](https://community.prismic.io/t/graphquery-question/1479/1 "2020-08-08T20:58:51Z")

</div>

Hi! I've been trying to use a GraphQuery in with the JS API and I'm stuck on one part.

I have a slice on my homepage which has links to three items of a custom type called "video".  
With the Query I'm trying to get the content of the linked video document with the GraphQuery.

This is my query:

```
const graphQuery = `{
  home {
    body {
      ...on top_videos {
          non-repeat {
            ...non-repeatFields
          }
          repeat {
            ...repeatFields
          }
        }
      }
    }
  }`

```

In that repeat zone I have links to documents of part video. When I use the ...repeatFields I only get link data. But I actually want to get the title and image, etc.

In the docs there is this example:

```
{
  blog {
    author_link {
      ...on author {
        name_of_the_author
      }
    }
  }
}

```

But I can't get that to work in my case.

What do I do?

Thanks!

---

<div class="post-metadata">

**Author:** ![tbenniks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/tbenniks/32/200_2.png) [@tbenniks](https://community.prismic.io/u/tbenniks)\
**Post date:** [August 9, 2020, 8:12am UTC](https://community.prismic.io/t/graphquery-question/1479/2 "2020-08-09T08:12:58Z")

</div>

I have managed to resolve my issue. I had to add a content relationship field rather than a link field. This is the query that works:

```
{
        home {
          body {
            ...on top_videos {
              repeat {
                ...repeatFields
                video {
                  ...on video {
                    ...videoFields
                  }
                }
              }
            }
          }
        }
      }
```

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [August 28, 2020, 9:20am UTC](https://community.prismic.io/t/graphquery-question/1479/3 "2020-08-28T09:20:00Z")

</div>

Hi Tim,

Thanks for sharing the solution,  
Please let us know if you need any help.

Fares

---

<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:** [September 15, 2020, 4:45pm UTC](https://community.prismic.io/t/graphquery-question/1479/4 "2020-09-15T16:45:28Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 12:10pm UTC](https://community.prismic.io/t/graphquery-question/1479/5 "2021-12-09T12:10:19Z")

</div>


