Skip to content

Behaviour of database policy with PUT/PATCH operations #1430

@ayush3797

Description

@ayush3797

PUT/PATCH operations resolve to one of the insert or update operations depending on whether the record corresponding to the given key exists in the table/view or not. If it exists, we perform do an update, else insert.

This behavior should continue to be followed even after the introduction of database policies. The policies will only be applied once the action to be performed (insert/update) as a result of PUT/PATCH operation is determined.

This would mean we first need to somehow determine if there is a record existing in the table/view and then proceed on to perform the appropriate operation. This determination may or may not need an additional round trip to the database depending on the database flavor specifics.

Since PUT/PATCH operations are only supported for REST, this added complexity is for these operations only. GraphQL side of things are untouched.

Metadata

Metadata

Labels

mssqlan issue thats specific to mssqlmysqlan issue thats specific to mysqlpgsqlan issue thats specific to pgsqlrestspecificationsExpected behaviour

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions