Builder content link
archive page
Builder public api key
f127073fccdc44a590bf4362d8bb100b
What are you trying to accomplish
I’m trying to create a gatsby page based on the archive page model shown above. When I write the grapghql query to retrieve all the page content I’m not able to get the complete model respose for blogPostCategories
and pinnedBlogPosts
which are a list of references to some data models. I tried using enrich: true
, includeRefs: true
and includesubRefs: true
without success (tried them together and separated).
Code stack you are integrating Builder with
This is the query used
query Test {
oneArchive(options: {enrich: true, includeRefs: true, includesubRefs: true}) {
data {
title
documentMeta
slug
lede
blogPostCategories
pinnedBlogPosts
}
}
}
And this is always the response:
"data": {
"oneArchive": {
"data": {
"title": "Inside the Trading Room",
"documentMeta": {
"@type": "@builder.io/core:Reference",
"model": "document-meta",
"id": "7b26be1ba9de42678e14d8b1998b4e0d"
},
"slug": "resource",
"lede": "The latest and greatest news, articles and thoughts from the Sporttrade team.",
"blogPostCategories": [
{
"blogPostCategory": {
"@type": "@builder.io/core:Reference",
"model": "blog-post-category",
"id": "dfd5fff4ba0c4e54bea40af57596c921"
}
},
{
"blogPostCategory": {
"@type": "@builder.io/core:Reference",
"model": "blog-post-category",
"id": "3ca6de655f65483b9ac2fbe0ebc63ef2"
}
}
],
"pinnedBlogPosts": [
{
"pinnedBlogPost": {
"@type": "@builder.io/core:Reference",
"model": "blog-post",
"id": "38e1c3a48ab3441bbe33a849be321e50"
}
},
{
"pinnedBlogPost": {
"@type": "@builder.io/core:Reference",
"model": "blog-post",
"id": "19c3999efe02448ca9233898f22c3a1e"
}
}
]
}
}
}