Extend GraphQL Content Fragment Model Result
Hello,
In our project we are using the GraphQL solution to obtain information from Content Fragments and render it through React components.
We have created a series of persistedQueries to retrieve the information and everything works as indicated in the documentation, but we have encountered a small problem.
The CFM on which we retrieve the data, has classification information based on Tags, and when retrieving those fields, it only returns the tag path information, but not its title (categoryTag😞
{
"data": {
"articleList": {
"items": [
{
"type": "new",
"_path": "/content/dam/uoc-common/news/ca/114-ciutat-15-minuts",
"detailPageUrl": "/content/dam/uoc-common/news/ca/114-ciutat-15-minuts",
"categoryTag": [
"/content/cq:tags/news/categories/economy"
],
"title": "La ciutat dels quinze minuts caminant comença per unes voreres que facilitin la mobilitat",
....
and of course to be able to present it in the react component we are interested in its localized title. Something like this:
"categoryTag": [{
"_path": "/content/cq:tags/news/categories/economy",
"title": "Economy"
}],
Is there any way to extend the result of the persisted queries to be able to customize the return of some fields?
Looking in the documentation or debugging the process of creating schemes or executing the queries I have not found the way.
thank you very much,
Thanks,
Joan Manel
