You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a page that contains a list of block types, whcih include nested relationships. In my graphql query, I just want to get the IDs from these relationships back, but they are returning an empty array even though content has been set?
Screenshot from the playground - you can see the slices[0].posts array is empty, but there are 2 set in payload. They are definitely published, and are returned using the rest API. Does anyone know why I am getting this empty array?
The featured block is returning its relationship, so the only difference between these two blocsk is that the slider is more nested and allows many in the relationship.
query {
DiscoverPage {
title
slices {
__typename
... on Slider {
posts {
relationTo
value {
__typename
... on Hotel {
id
}
... on Blog {
id
}
... on Perspective {
id
}
... on Guide {
id
}
... on City {
id
}
... on Place {
id
}
... on Experience {
id
}
}
}
}
... on Featured {
post {
value {
... on Hotel {
id
}
... on Blog {
id
}
... on Perspective {
id
}
... on Guide {
id
}
... on City {
id
}
... on Place {
id
}
... on Experience {
id
}
}
}
}
}
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a page that contains a list of block types, whcih include nested relationships. In my graphql query, I just want to get the IDs from these relationships back, but they are returning an empty array even though content has been set?
Screenshot from the playground - you can see the slices[0].posts array is empty, but there are 2 set in payload. They are definitely published, and are returned using the rest API. Does anyone know why I am getting this empty array?
The featured block is returning its relationship, so the only difference between these two blocsk is that the slider is more nested and allows many in the relationship.
My page setup:
Relevant bits of my graphql query:
Appreciate any help, thanks!
Beta Was this translation helpful? Give feedback.
All reactions