hasura / hasura/graphql-engine
Update mutation without columns
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
In Hasura 1.3.2 we configured a update mutation for a table with only one column with a preset. It's a way for the client to tell us everything is finished. It's just possible to change the state to 8.

The mutation with an empty set:
```
mutation {
update_insp_inspections(where: {id: {_eq: "b84ddb1b-96d8-45cc-a195-6c2a125ed336"}}, _set: {}) {
affected_rows
}
}
```
Since we upgraded from 1.3.2 to 2.0.6 it doesn't work anymore. The mutation doesn't appear in the schema.
```
{
"errors": [
{
"extensions": {
"path": "$.selectionSet.update_insp_inspections",
"code": "validation-failed"
},
"message": "field \"update_insp_inspections\" not found in type: 'mutation_root'"
}
]
}
```
Now we need to add a dummy column with update permission without preset. Then the mutations appears again in schema.
Is this change intended or is it a bug?
Contributor guide
Research direction
Reproduce the reported update_insp_inspections mutation on Hasura 2.0.6, using the empty _set object and the update permission with a preset described in the issue. Compare the generated mutation_root schema with 1.3.2 and determine whether the missing mutation is intended; done means the behavior is clarified or corrected with coverage for this permission configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authorization, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100