We plan to improve the error handling behavior of the GraphQL API for multiple mutations sent in a single request. If a payload contains at least one invalid mutation, the API will provide a clearer response in the data
and errors
attributes. The response will explicitly indicate that no mutations have been applied, preventing assumptions of partial success. The core behavior of the GraphQL API remains unchanged in how it handles multiple mutations in a single request.
To learn more about how error handling in GraphQL works, visit Error Handling in GraphQL.
Current Behavior
When you send multiple mutations in a single API request and at least one mutation is invalid (such as a mutation for updating a non-existent field), none of the mutations in that request are executed. However, the API response might be mistaken for a successful partial execution because valid mutations are listed in the data
attribute of the response.
What’s Changing
On July 14, 2025, at 9 AM CEST, we’ll update the error handling behavior of the GraphQL API. When multiple mutations are sent in a single API request and at least one mutation is invalid, the following will happen:
- The
data
attribute will returnnull
in the API response. - The
errors
attribute will include an entry for each failed mutation, along with an error description. - A message
Error in Request. Transaction is rolled back!
will be returned to indicate that any other valid mutations that did not cause an error weren't effectively applied.
What You Need to Do
Adjust your GraphQL API calls and integrations where needed to account for the new error response.
Example
In the request below, the mutation m2
for updating a fact sheet includes an invalid field: descriptio
.
Example request:
mutation {
m1: updateFactSheet(
id: "d9506c79-5d4e-4661-9297-b3b84bd17b79"
patches: [{ op: replace, path: "/description", value: "first description" }]
) {
factSheet {
id
description
}
}
m2: updateFactSheet(
id: "3b2f5b03-8cff-4aa1-a619-38aa7e90d456"
patches: [
{ op: replace, path: "/descriptio", value: "invalid field description" }
]
) {
factSheet {
id
description
}
}
m3: updateFactSheet(
id: "351ee5ff-c851-48c5-92e6-3d373c6483ce"
patches: [
{ op: replace, path: "/description", value: "third description" }
]
) {
factSheet {
id
description
}
}
}
In the response, the data
attribute returns null
. The errors
attribute provides details about the failed mutation. An error message indicates that the entire request hasn't been executed and none of the mutations have been applied.
Example response:
{
"data" : null,
"errors" : [ {
"message" : "The path '/descriptio' is invalid in FactSheet schema Application.",
"path" : [ "m2" ],
"extensions" : {
"errorType" : "BUSINESS_LOGIC"
}
}, {
"message" : "Error in Request. Transaction is rolled back!",
"path" : [ ],
"extensions" : {
"errorType" : "BUSINESS_LOGIC"
}
} ]
}