Graphql Filter with flatData

Hi Sebastian,

I need to filter with flatData query on Graphql

Example: { queryProductsContents(filter:“flatData/featured eq true”){ flatData{title} }

but not working message:

OData $filter clause not valid: Could not find a property named ‘flatData’ on type ‘example.products’

Please help for this.

Thank you.

Thats by design. The flat-data thing is a conversion that takes place after the data has been queried from the database, but the filtering works on the database and has to use the normal data.

How can I use the x-language information from flatData at filter when there is a localization field?

example: { queryProductsContents(filter:“data/featured/{x-language} eq true”){ flatData{title} }

I need this kind of usage.

Thank you

No, it is not possible at the moment.

A development to support this kind of use would be nice. Of course, it can be implemented differently, but the purpose of flatData is to facilitate language separation. We should also facilitate this with features such as filters and sorting.

It is very likely not possible this way. Perhaps with a replacement as you described above

1 Like