So for every structured text field I have to repeat something like this for internal record links in the GraphQL query:
description {
blocks
value
links {
__typename
... on ProductRecord {
id
slug
title
subtitle
}
... on ProductCategoryRecord {
id
slug
name
}
... on SolutionRecord {
id
slug
title
subtitle
}
... on SolutionCategoryRecord {
id
slug
}
... on BlogPostRecord {
id
slug
name,
category {
slug
}
}
... on BlogCategoryRecord {
id
slug
name
}
... on PageRecord {
id
slug
title
}
}
}
Is there a way to add the links {}
part into a fragment or something similar?