to get a personalized navigation.
to get a personalized navigation.
Hi
to avoid to hit the Quota limitations at once, I try to find out how to update several rows in a table with one API-call, but I don't get that work:
Example:
mutation {
useCompany(no: 13245678) {
a1: associate_update(value: {bankAccount: ""}, filter:{_and: [{associateNo: {_eq:4016}}]})
{
items
{
associateNo
bankAccount
}
}
a2: associate_update(value: {bankAccount: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}, filter:{_and: [{associateNo: {_eq:4017}}]})
{
items
{
associateNo
bankAccount
}
}
}
}
Results in:
{
"errors": [
{
"message": "Error: Illegal IBAN \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\".",
"extensions": {
"data": {
"status": 0
}
}
}
],
"data": {
"useCompany": {
"a1": {
"items": [
{
"associateNo": 4016,
"bankAccount": ""
}
]
},
"a2": {
"items": [
{
"associateNo": 4017,
"bankAccount": ""
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000005f852d7e603273db"
}
}
And this here:
mutation {
useCompany(no: 13245678) {
a1: associate_update(value: {bankAccount: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}, filter:{_and: [{associateNo: {_eq:4016}}]})
{
items
{
associateNo
bankAccount
}
}
a2: associate_update(value: {bankAccount: ""}, filter:{_and: [{associateNo: {_eq:4017}}]})
{
items
{
associateNo
bankAccount
}
}
}
}
Results in:
{
"errors": [
{
"message": "Error: Illegal IBAN \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\".",
"extensions": {
"data": {
"status": 0
}
}
}
],
"data": {
"useCompany": {
"a1": {
"items": [
{
"associateNo": 4016,
"bankAccount": ""
}
]
},
"a2": {
"items": [
{
"associateNo": 4017,
"bankAccount": ""
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "00000000000000004f26c5c4ae15cf18"
}
}
Thats means that I get exact the same error-message without a reference to the right query.
The result in both queries is the same too.
1. Bundling the row-updates to 1 Graphql complicates things a lot on our site
2. The error-handling does not work as it is
What is the best suggestion?
Florian
Batching requests is now available. See the documentation here: https://docs.business.visma.net/docs/features/batches
Would be cool if batch operations were executed in parallel, since they won’t share any data between them. And if you need something executed sequentially you could use the “inline batch”.
Is there any plans from Vismas side to enable GraphQL batching?
This should be possible using GraphQL batching, but I don't think it's enabled from Visma's side.
This will create a request like the one below, and the API returns a 500 error.
Hi Ole,
okay - one thing is that this is not working, but why do you think the errorhandling would work better than in my solution? What would the result be?
Florian
Copyright © 2022 Visma.com. All rights reserved.