I did something similar for my header navigation with some nested content relationships:
return await graphQLClient.query({
query: gql`query {
allNavigations(uid: "header") {
edges{
node {
logo
_linkType
items {
label
link {
_linkType
... on Page {
meta_title
_meta {
uid
id
type
}
children {
child {
... on Page {
_meta {
uid
id
type
}
}
}
label
}
}
... on _ExternalLink{
url
target
}
}
}
}
}
}
}`,
});
I think I'll stick to my hydration method by building the mapped items array on a slice. i.e. Hydarating relationship links - #2 by Acen