Hello prismic team!
I've encountered a weird error using the graphquery option of the js client:
Here's the minimal reproduction:
Route resolver object:
[
// ...
{
type: 'guide',
resolvers: {
product: 'product_type',
},
path: '/:product/guide/:uid',
},
]
Client code:
const FAQ_FOLDER_BY_UID_QUERY = `{
faq_folder {
page_category {
page_category_relationship {
... on faq_category {
faq_category_group {
faq_category_group_relationship {
...on faq {
faq_content
}
}
}
}
}
}
}
}`;
const { data } = await client.getByUID('faq_folder', 'my-document-uid', {
graphQuery: FAQ_FOLDER_BY_UID_QUERY,
});
Expected result:
The resulting JSON should contain a span like:
// inside the faq_content field
{
"type": "guide",
"uid": "linked-document-uid",
"url": "product-uid/guide/linked-document-uid",
"link_type": "Document",
"isBroken": false
}
Actual result:
The resulting json looks like:
// inside the faq_content field
{
"type": "guide",
"uid": "linked-document-uid",
"url": ">&<018Y-5VjRAAACMAwUCe%%/guide/linked-document-id",
"link_type": "Document",
"isBroken": false
}
Thank you in advance for you help