hasura / hasura/graphql-engine

Multiple mutations - which failed

Open
#7,260 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

If a multi mutation query fails the error (path) doesn't contains which failed. For example:

Query:
```graphql
mutation MyTest($id: uuid! = "2537387b-906f-4a75-acee-046cc4065acd") {
u1: update_organisation_by_pk(pk_columns: {id: $id}, _set: {name: "J1"}) {
id
name
}
u2: update_organisation_by_pk(pk_columns: {id: $id}, _set: {name: "JaniOrg"}) { # this will fail
id
name
}
}
```

Response:
```json
{
"data": null,
"errors": [
{
"extensions": {
"path": "$",
"code": "constraint-violation"
},
"message": "Uniqueness violation. duplicate key value violates unique constraint \"organisation_name_deleted_at_key\""
}
]
}
```

In this case I expect path = $.u2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.