Try out the following on slash gql →
Schema:
type simpleObj{
name: String! @id
vals: [Int!]
}
Mutation:
mutation MyMutation($vals: [Int!] ) {
addsimpleObj(input: {name: "One", vals: $vals}) {
numUids
}
}
--- query variable---
{
"vals": [0,1,0,2,0,3,0,4]
}
Query:
query MyQuery {
querysimpleObj {
name
vals
}
}
Result:
{
"name": "One",
"vals": [
0,
4,
2,
1,
3
]
}
Expected Result:
{
"name": "One",
"vals": [
0,
1,
0,
2,
0,
3,
0,
4
]
}
Leads to problems if array has repeated values (as those values aren’t returned). Problem occurs for all built-in Object types