Distinguishing Language Fallback Content in Sitecore GraphQL Queries
Identifying Fallback Content in Sitecore GraphQL.
Start typing to search...
When using Sitecore's Language Fallback feature, GraphQL queries do not indicate if a value is explicitly set in the requested language or inherited through fallback. This can make it challenging to determine the origin of the content.
Add a timestamp field in your templates to track the last update time of content in each language. By using the $now token, this field automatically populates with the current timestamp when the first version is created.
1. Add a Timestamp Field to Template
Navigate to the desired template and add a new Single-Line Text field (e.g., Timestamp). This field must not be shared or unversioned.
2. Set Default Value using Token $now
In the template’s standard values, set the default value to $now.
Query your items, including Timestamp field along with other content fields. See the results:
A same timestamp means that one version is a fallback, based on how fallback is configured in Sitecore, you can determine which version is the original.