CockpitQL icon indicating copy to clipboard operation
CockpitQL copied to clipboard

Linked item does not work

Open joshuaavalon opened this issue 6 years ago • 2 comments

{
  allPerson {
    name
    image {
      url
    }
  }
}

It returns url as null. It seems like linked items only return _id

joshuaavalon avatar Dec 11 '18 14:12 joshuaavalon

Had a similar Problem. Looking through the closed issues, I sumbled across this reply It suggest to set the populate parameter:

query { 
   allCategories(populate:1) {
       _id, 
      Subcategories { 
         Name 
      } 
   } 
}

and it's working!

aequi42 avatar Jan 12 '19 23:01 aequi42

Also worth knowing - if you have deeper levels of nested linked collections, you can just increase the populate integer as necessary.

wuhhh avatar Mar 13 '19 11:03 wuhhh