Product Updates

DatoCMS changelog for new features and general improvements
Content Delivery API

Improved multi-locale fields and meta fields in Content Delivery API

May 8th, 2023
Current behavior

Both locale: and fallbackLocales: arguments can be passed to multi-locale fields, but both arguments are completely ignored:

query {
allBlogPosts {
_allTitleLocales(locale: it_IT, fallbackLocales: [it, en]) {
locale
value
}
}
}

Similarly, the fallbackLocales: argument can be passed down to meta fields, but it's ignored:

query {
_allBlogPostsMeta(fallbackLocales: [it, en]) {
count
}
}
Improved behavior

Both the locale: argument in multi-locale fields, and the fallbackLocales: argument in meta fields are removed, as they make no sense.

The fallbackLocales: argument in multi-locale fields is now taken into consideration when a value for a particular locale is missing:

query {
allBlogPosts {
noFallbacks: _allTitleLocales {
locale
value
}
withFallbacks: _allTitleLocales(fallbackLocales: [en]) {
locale
value
}
}
_allBlogPostsMeta {
count
}
}
{
"allBlogPosts" {
noFallbacks: [
{ locale: "it", value: "" },
{ locale: "es", value: "Título" },
{ locale: "en", value: "Title" },
],
withFallbacks: [
{ locale: "it", value: "Title" },
{ locale: "es", value: "Título" },
{ locale: "en", value: "Title" },
],
},
"_allBlogPostsMeta": {
"count": 3
}
}
Who is affected by this change?

This change will apply to all brand new DatoCMS projects created from today onwards. If you have an existing project that you'd like to update, you can manually do so in the Environment Settings.

Please note that this change cannot be undone, so we strongly recommend testing the effects in a sandbox environment before applying the change to your primary environment.

Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480