
When working with Sitecore XM Cloud in a headless architecture, especially with JSS (React or Next.js), developers primarily rely on Experience Edge GraphQL queries to fetch the necessary data for the components. While retrieving the content fields is straightforward, accessing the system fields such as "Created by" and "Updated by" can be challenging and cumbersome.
These system fields are often required for auditing, sorting the search results, or displaying user information. However, they are not exposed by default in Experience Edge GraphQL queries. As a result, developers need to explore alternative approaches to make these fields available in their Experience Edge queries.
Steps to Expose System Fields in Experience Edge GraphQL Queries
Firstly, let’s see what happens when we try to access system fields in XM Cloud without making any changes to expose them in Experience Edge queries.

In the above screenshot, you can observe that the "Created" and "Updated" fields are returning values, while the "Created by" and "Updated by" fields are returned as null.
Now, let’s create a configuration file to expose the additional system fields.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<api>
<GraphQL>
<defaults>
<content>
<standardFieldsResolver type="Sitecore.Services.GraphQL.EdgeSchema.StandardFields.StandardFieldsResolver, Sitecore.Services.GraphQL.EdgeSchema">
<supportedStandardFields hint="raw:AddSupportedStandardField">
<field name="__Owner" />
<field name="__Updated by" />
<field name="__Created by" />
</supportedStandardFields>
</standardFieldsResolver>
</content>
</defaults>
</GraphQL>
</api>
</sitecore>
</configuration>
This patch enables the standard template fields such as "Created by", "Updated by", and "Owner" to be queried through the Experience Edge API. As a result, these fields become available in headless and composable Sitecore XM Cloud solutions, allowing better support for auditing, metadata, and integration use cases.
After deploying the changes, let’s run the same GraphQL query from the first step and verify whether the fields that previously returned null are now returning values.

Note: This approach is specific to Sitecore AI (XM Cloud) and does not apply to Sitecore XP or XM Headless Services.
Why System Fields are Not Available by Default
In Sitecore Headless Services, the GraphQL schema is designed to keep things fast and secure. Because of this, fields that start with double underscores are hidden by default. These fields are not included in the GraphQL schema, so when you try to query them, they either return null or fail silently. This is done to make sure that unnecessary or sensitive data is not exposed through the API.
Best Practices
When working with the system fields, it is important to use them only when necessary. Avoid exposing additional system fields unless they are required for specific use cases such as sorting content by date, displaying publish or update information, or supporting auditing needs. Limiting the use of system fields helps maintain a clean and efficient data structure.
Keeping the GraphQL schema clean is equally important. Only include fields that are actively used in the application. This helps to reduce the payload size, improves query performance, and also ensures a more optimized frontend experience.
When working with headless applications, it is recommended to use jsonValue instead of raw field values. This ensures compatibility with Sitecore field helpers and provides a more consistent way of handling field data on the frontend.
Additionally, always validate the implementation across different environments. Behavior can vary between Sitecore XP, Sitecore XM, XM Cloud, and Experience Edge. Testing in the specific environment ensures that the solution works as expected and avoids unexpected issues during deployment.
Common Use Cases
System fields are commonly used in the following scenarios:
1. Displaying “Last Updated” or “Last Updated By” information on blog or content pages.
2. Sorting items based on their creation date.
3. Auditing content changes.
4. Integrating with analytics or external systems.
Accessing the system fields in Sitecore Headless Services requires a clear understanding of how the GraphQL schema is generated and how fields are exposed. By adjusting the schema configuration, handling default exclusions, and querying fields appropriately through template types, you can unlock powerful metadata capabilities in your headless applications.
References
Making Fields from the Standard Template Publishable - https://doc.sitecore.com/sai/en/developers/sitecoreai/making-fields-from-the-standard-template-publishable.html
Using a Patch File - https://doc.sitecore.com/sai/en/developers/sitecoreai/use-a-patch-file-to-customize-the-sitecore-configuration.html
That's All for Today,
Happy Coding
Coders for Life