Relation with actual data?

Hi, i have a Relations field add to my homepage to get “Testimonials(repeat content type)”

but now i just get

> testimonial:Object
> 
> id:"XqmT-hAAACEAbArs"
> 
> isBroken:false
> 
> lang:"de-de"
> 
> link_type:"Document"
> 
> slug:"marko-bolliger"
> 
> tags:Array[0]
> 
> type:"testimonials"
> 
> uid:"marko-bolliger"

do i need to query now all relations again? because my relation link has stuff like avatar, url etc… but i want this in one query is this possible?

here is my json for homepage with repeatable relation

{
  "Main" : {
    "body" : {
      "type" : "Slices",
      "fieldset" : "Slice zone",
      "config" : {
        "labels" : {
          "testimonials" : [ ]
        },
        "choices" : {
          "testimonials" : {
            "type" : "Slice",
            "fieldset" : "Testimonials",
            "description" : ".",
            "icon" : "person",
            "display" : "list",
            "non-repeat" : {
              "title" : {
                "type" : "StructuredText",
                "config" : {
                  "single" : "heading1, heading2, heading3, heading4, heading5, heading6",
                  "label" : "title",
                  "placeholder" : "What customers say"
                }
              },
              "intro" : {
                "type" : "StructuredText",
                "config" : {
                  "multi" : "paragraph, strong, em",
                  "label" : "intro"
                }
              }
            },
            "repeat" : {
              "testimonial" : {
                "type" : "Link",
                "config" : {
                  "select" : "document",
                  "customtypes" : [ "testimonials" ],
                  "label" : "testimonial"
                }
              }
            }
          }
        }
      }
    }
  }
}

got it working

const resp = await this.$prismic.api.getSingle('homepage', {
      fetchLinks: ['testimonials.avatar']
    })

Hi,

Glad you figured it out. If you want any more info on fetch links you can check out the docs:
https://prismic.io/docs/javascript/query-the-api/fetch-linked-document-fields

Also just a heads up fetch links is limited on some of the data that it can get, so we created another feature called GraphQuery (fetchlinks v2) that can get more complex data, make sure to check it out:
https://prismic.io/docs/rest-api/query-the-api/graphquery

ah nice to know thanks