How to get flat data for content with GraphQL

Hey Squidex Team,

You mention implementing flat data returned via GraphQL in context of languages in this topic: [IMPLEMENTED] GraphQL default language

How does this work exactly? I can’t find information on it in the docs.
There is no flatData property in my content type, I can only access particular languages - en, pl,…

  • I did add ‘X-Languages’ header, and that makes my response includes only one of the languages, others are null
  • I did add ‘X-Flatten’: ‘true’, but this doesn’t seem to have any effect on flattening the data, still I can access individual languages.

Thanks!

Which version do you use?

I’m using version that is currently hosted by Squidex

Okay, you should have the flatdata property there:

1 Like

We are also facing a similar issue.

Here is a sample query for ‘article’ an entity in our SCHEMA

The current queries don’t allow for setting the locale of the flatData it is always returned in the default language.

{
      queryArticleContentsWithTotal(top: 0, filter: "status eq 'Published' and data/slug/en eq 'cool-perks-that-you-need-to-hear-about'") {
        total
        items {
          id
          created
          status
          url
          flatData {
            summary
          }
          data {
            summary {
              zh_TW
              en
            }
          }
        }

[Cloud:Squidex]
App: vannatest

Can there be an elaborate example of an existing demo app where this is well documented as a strong use case for multiple locales being fetched in flatdata or based on specific locales mentioned dynamically

EDIT (updation of support ticket) REQUEST: My reason for documentation clarification is

https://docs.squidex.io/02-documentation/concepts/localization is this approach still supported?

Hey @Sebastian please shed some light on the challenge of flat data content with language permutations for GraphQL query stated above ?

As described in the docs:

But please note that it only works with a real client token, not with your personal token, because this token that you see in the Chrome logs is for the UI