Try our conversational search powered by Generative AI!

Jonas Bergqvist
Jan 23, 2023
  855
(2 votes)

Planned breaking change for Locale parameter in Content Graph

Content Graph, a new service which makes it possible to query content using GraphQL, will have a breaking change soon. The service is currently in public beta, which still makes it possible for us to make breaking changes to improve the API. We will change the behaviour for the "locale" parameter, to make it more valuable and easy to understand.

Locale

The "locale" parameter are used for selecting which languages to query. The parameter type is an array, which makes it possible to query for many languages at the same time. The problem with the current implementation is that you can select a fixed number of languages in the query, which doesn't reflect the languages you have in your CMS.

We will soon change the implementation, to instead dynamically create an enum that reflects the CMS languages that has been selected in your CMS. This makes it possible to differentiate between for example en-Gb and en-US, in case you have multiple English versions of your pages. The only difference in language name is that we are using _ instead of - when selecting a culture specific language. en-GB becomes en_GB in Content Graph and en-US becomes en_US.

query MyQuery {
  StartPage(locale: en_GB) {
    items {
      Name
    }
  }
}

Read more about the update here: https://docs.developers.optimizely.com/digital-experience-platform/v1.4.0-content-graph/docs/locale

Jan 23, 2023

Comments

Please login to comment.
Latest blogs
Adding market segment for Customized Commerce 14

Since v.14 of commerce, the old solution  for adding market segment to the url is not working anymore due to techinal changes of .NET Core. There i...

Oskar Zetterberg | May 2, 2024

Blazor components in Optimizely CMS admin/edit interface

Lab: Integrating Blazor Components into Various Aspects of Optimizely CMS admin/edit interface

Ove Lartelius | May 2, 2024 | Syndicated blog

Anonymous Tracking Across Devices with Optimizely ODP

An article by Lead Integration Developer, Daniel Copping In this article, I’ll describe how you can use the Optimizely Data Platform (ODP) to...

Daniel Copping | Apr 30, 2024 | Syndicated blog

Optimizely Forms - How to add extra data automatically into submission

Some words about Optimizely Forms Optimizely Forms is a built-in add-on by Optimizely development team that enables to create forms dynamically via...

Binh Nguyen Thi | Apr 29, 2024

Azure AI Language – Extractive Summarisation in Optimizely CMS

In this article, I demonstrate how extractive summarisation, provided by the Azure AI Language platform, can be leveraged to produce a set of summa...

Anil Patel | Apr 26, 2024 | Syndicated blog

Optimizely Unit Testing Using CmsContentScaffolding Package

Introduction Unit tests shouldn't be created just for business logic, but also for the content and rules defined for content creation (available...

MilosR | Apr 26, 2024