to get a personalized navigation.
to get a personalized navigation.
I want to update associates by having the filters \ values pair in variables, but I get the following error when trying that: "Input value cannot be null." It's working when I use filter \ value pair in variables, but I see from the documentation that filters/values should be used: "The filter \ value pair is considered deprecated and will be removed in the future. You should use the filters \ values pair instead." The filters \ values pair is working when not used in variables.
Example where it doesn't work with filters \ values pair:
mutation insert($cid : Int!, $filters : [FilterExpression_Associate], $values : [Associate_Input!]!)
{
useCompany(no: $cid)
{
associate_update(
filters: $filters
values: $values
)
{
affectedRows
items
{
associateNo
customerNo
name
}
}
}
}
Variables:
{
"cid": 123,
"filters": [
{
"associateNo": {
"_eq": 1543
}
}
],
"values": [
{
"name": "Test filters/values var cust 1"
}
]
}
Response:
{
"errors": [
{
"message": "Input value cannot be null.",
"path": [
"useCompany",
"associate_update"
]
}
],
"data": {
"useCompany": {
"associate_update": null
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000003f670c7edf83f59c"
}
}
Example where it works with the filter \ value pair:
mutation insert($cid : Int!, $filter : FilterExpression_Associate, $value : Associate_Input!)
{
useCompany(no: $cid)
{
associate_update(
filter: $filter
value: $value
)
{
affectedRows
items
{
associateNo
customerNo
name
}
}
}
}
Variables:
{
"cid": 123,
"filter": {
"associateNo": {
"_eq": 1543
}
},
"value": {
"name": "Test filter/value var cust 1"
}
}
Response:
{
"data": {
"useCompany": {
"associate_update": {
"affectedRows": 1,
"items": [
{
"associateNo": 1543,
"customerNo": 16101,
"name": "Test filter/value var cust 1"
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000009fa107295b59f602"
}
}
Example where filters \ values pair is working when not used in variables:
mutation insert($cid : Int!)
{
useCompany(no: $cid)
{
associate_update(
filters: [
{associateNo : {_eq : 1543}}
]
values:[
{
name: "test cust without var u1"
}
])
{
affectedRows
items
{
associateNo
customerNo
name
}
}
}
}
Variables:
{
"cid": 123
}
Response:
{
"data": {
"useCompany": {
"associate_update": {
"affectedRows": 1,
"items": [
{
"associateNo": 1543,
"customerNo": 16101,
"name": "test cust without var u1"
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "000000000000000006b69f92f6643284"
}
}
Solved! Go to Solution.
The fix for this is now in production.
Great, thanks for letting me know.
This is a bug. Thank you for reporting it. We will investigate and fix it.
Copyright © 2022 Visma.com. All rights reserved.