Distinguishing Language Fallback Content in Sitecore GraphQL Queries

Identifying Fallback Content in Sitecore GraphQL.

May 13, 2025

By Roberto Barbedo

Identifying Fallback Content in GraphQL Queries

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.

Solution: Adding a Timestamp Field

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.

Sitecore field showing Timestamp set to $now
Template _Standard Values with Timestamp
  1. Retrieve Timestamp in the GraphQL Query

Query your items, including Timestamp field along with other content fields. See the results:

Sitecore language versions
Sample item with two versions and one fallback version.
GraphQL query results showing
Results from query using the Timestamp

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.

Roberto Barbedo

Solutions Architect

Roberto is a Sitecore Solution Architect with experience in the build and implementation of large-scale Sitecore development projects for global clients.