The Preview GraphQL endpoint

The Preview GraphQL endpoint reads data from the content management (CM) back end, both published and unpublished. Previewing your unpublished content is an important part of the content development lifecycle, before finalizing content and publishing to Experience Edge.

Note

The Preview GraphQL endpoint provides a tokenized search, and will therefore return multiple results when the CONTAINS operator is used.

The following topics describe how to use the Preview GraphQL endpoint:

To learn about the GraphQL preview limitations and restrictions, see Limitations and restrictions for Headless Services with the Edge preview.

Important

We do not support extending the read-only GraphQL (mirrored) schema, because it breaks compatibility with Experience Edge.

There are some differences between the fields available between preview and published content. Therefore, when querying published content available in Experience Edge, use the fields described in the Experience Edge documentation, and any fields you might have added by making fields from the standard template publishable.

Disabling authentication for media items

By default, viewing media items in the preview endpoint requires authentication. However, you can disable that requirement for a specified period, by using the Media.UrlSignatureExpirationTimeout setting in the sitecore.config file, in the following format:

RequestResponse
<!-- MEDIA URL SIGNATURE EXPIRATION TIMEOUT
            The time after which the media URL signature expires.
            The value must be in the format "hh:mm:ss".
            Default value: 00:10:00 (10 minutes)
      -->
        <setting name="Media.UrlSignatureExpirationTimeout" value="00:10:00"/>

If the value is set to 0, authentication is enforced at all times.

After you update the setting, remember to use a patch file to apply the configuration change.

Do you have some feedback for us?

If you have suggestions for improving this article,