Gatsby : Localised Modular Content fetching

Hey there,

I cannot figure out how to fetch a localised modular content in Gatsby .

This is roughly my page model:

  • section_name (single line / localised)
  • section_list (modular content / localised) made of one feature item block:

Feature Item:

  • item_title (single line)

How should I query that (cannot get my head around…)?

datoCmsPage {
          _allSectionNameLocales {
            locale
            value
          } 
         sectionList {
            ... on DatoCmsFeatureItem {
              model {
                apiKey
              }
              itemTitle
            }
          }
        }

Any support appreciated!

hey @jb

you should be able to do something like this:

datoCmsPage {
  _allSectionNameLocales {
    locale
    value
  } 
  _allSectionListLocales {
    locale
    value {
      ... on DatoCmsFeatureItem {
        model {
          apiKey
        }
        itemTitle
      }  
    }
  }
}
1 Like

Working now; thanks! Hope it can help others…

1 Like