mesh
mesh copied to clipboard
GraphQL filtering Children by languages is being ignored
Gentics Mesh Version, operating system, or hardware.
- v1.5.1
Operating System
- Linux
JVM
- Open JDK 11.0.5 (Docker Container)
Problem
When using the children
in GraphQL, it describes the lang
Parameter as follows:
lang: [String]
Language tags to filter by. When set only nodes which contain at least one of the provided language tags will be returned
When putting that to a test, it does sadly not filter anything and returns all elements regardless.
Reproducer
Can be tested on the demo with following query:
{
node(path:"/aircrafts") {
children(lang: ["de"]) {
elements {
language
uuid
}
}
}
}
Expected behaviour and actual behaviour
It should filter out all elements which are not permitted from the given language list
Currently the behavior is to fall back to the default language if the children have no content in the desired language.
See also https://github.com/gentics/mesh/issues/971
Same Problem here. It ignores all other languages and only checks for the first provided language in the array, in my case "de".
Example query
node(path:"/foo"){ children(lang: ["de", "en"], filter: {fields: {Bar: {name: {equals: "Something"}}} }){ elements{ languages{ language displayName uuid } } } }
the example query would show no matches, but if i change the lang array to ["en", "de"] it will find a node.