gentics / gentics/mesh

GraphQL query responses show default language versions only

Open
#1,168 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
593
Forks
123
Avg merge
2d 18h
Merged PRs (30d)
4

Description

## Gentics Mesh Version, operating system, or hardware.
- v1.7.6

## Operating System
- MacOSX (Docker)

## JVM
- Open JDK 1.8.0_100

## Problem
If you use GraphQL in a multi language scenario, it will always give you the node's "versions" of the default language, no matter wich language you query. You can not query the version history of other languages.

## Reproducer
* Create a Node
* Make some changes in the default language
* Add a new language to the node
* Make a different number of changes then you did in the default language
* Query the versions
```
{
node(uuid: "06ca1bfb099c4d4580976995e6f594f0", lang: "de") {
version
versions {
version
}
}
}
```
```
{
node(uuid: "06ca1bfb099c4d4580976995e6f594f0", lang: "en") {
version
versions {
version
}
}
}
```
## Expected behaviour and actual behaviour
It should list different stacks of versions but it shows always the "versions" of "de"
"de" -->
```
{
"data": {
"node": {
"version": "1.0",
"versions": [
{
"version": "1.0"
},
{
"version": "0.1"
}
]
}
}
}
```
"en" -->
```
{
"data": {
"node": {
"version": "0.2",
"versions": [
{
"version": "1.0"
},
{
"version": "0.1"
}
]
}
}
}
```
See: https://github.com/gentics/mesh/issues/971

Contributor guide

Open the contributing guide

Research direction

Start with the GraphQL node query shown in the reproducer, comparing the lang values "de" and "en" and how the versions field is returned. Reproduce the two requests against the reported multilingual setup, then verify that each language returns its own version history rather than the default language's list.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.