Try our conversational search powered by Generative AI!

Jonas Bergqvist
Jan 23, 2023
  894
(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
Optimizely Search and Navigation - Part 2 - Filter Tips

Introduction Continuing from Part 1 – Search Tips , today I will share the next part – filter tips. The platform versions used for this article are...

Binh Nguyen Thi | Jul 1, 2024

Integrating HubSpot CRM without the MA Connector

Have HubSpot CRM? Want to push user data into it from Optimizely? Don’t have any personalisation requirements with that data? Don’t want to pay $80...

Matt Pallatt | Jun 27, 2024

Keeping the website secure by updating external packages

Did you see the latest warning from Optimizely to update this package with a critical security warning? https://world.optimizely.com/documentation/...

Daniel Ovaska | Jun 27, 2024

Optimizely CMS image anonymization now available for Linux!

The famous image anonymization add-on for Optimizely CMS, with at least 5 downloads, is now finally available for use on Linux. Supports simultaneo...

Tomas Hensrud Gulla | Jun 25, 2024 | Syndicated blog