Try our conversational search powered by Generative AI!

Jonas Bergqvist
Jan 23, 2023
(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.


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 {

Read more about the update here:

Jan 23, 2023


Please login to comment.
Latest blogs
Optimizely Opal... what it does actually do?

At Opticon 2023, Optimizely announced its first AI product Opal. AI is definitely the new tech buzzword in 2024 and with promises that AI will be...

Jon Jones | Feb 25, 2024 | Syndicated blog

How to add more Content Area Context Menu Item in Optimizely CMS 12

Hey folks, today I will share something related to Context Menu customization in the Content Area of Optimizely CMS. As you know, the content area ...

Binh Nguyen | Feb 25, 2024

Developer meetups in Stockholm & Helsinki

It's time for developer meetups! Next month we will be in Stockholm and Helsinki. Join us for getting the latest updates from Optimizely, be inspir...

Magnus Kjellander | Feb 23, 2024

Roll Your Own Security Headers

Proper security headers are a must for your Optimizely driven website. There are a variety of tools out there that will help with this, but when...

Ethan Schofer | Feb 21, 2024