When requesting data of a statement, qualifier or reference value where the value is a redirected item, we want the following behavior:
- the ID should be the one of the redirect source
- for labels, the redirect is resolved so that the label(s) of the redirect target are returned
- no message is added to the extensions field in the response for this redirect
Example
- Q1 has a statement linking to Q3 via property P1
- Q3 is a redirect to Q2
- Q2 has an english label "potato"
Request:
{
item(id: "Q1") {
statements(propertyId: "P1") {
value {
... on ItemValue {
id
label(languageCode: "en")
}
}
}
}
}Expected response:
{
"data": {
"item": {
"statements": [
{
"value": {
"id": "Q3",
"label": "potato"
}
}
]
}
}
}Task breakdown notes:
- redirects should be resolved in the BatchGetItemLabels use case
- there is probably an existing mechanism to resolve multiple item ids to the ids of their redirects since redirect labels are also resolved on the item page GUI