diff --git a/docs/reference/plugins/_optimistic-behavior.md b/docs/reference/plugins/_optimistic-behavior.md index 32463b03..6c54ff85 100644 --- a/docs/reference/plugins/_optimistic-behavior.md +++ b/docs/reference/plugins/_optimistic-behavior.md @@ -1,3 +1,4 @@ - `create` mutation inserts item to the head of the query results of the corresponding `useFindMany` queries. - `update` mutation updates the item in the query results of `useFindXXX` queries and their nested reads by matching the item's ID. +- `upsert` mutation first tries to update the item in the query results of `useFindXXX` queries and their nested reads by matching the item's ID. If the item is not found, it inserts the item to the head of the query results. - `delete` mutation removes the item from the query results of the corresponding `useFindMany` queries and sets `null` to `useFindUnique` and `useFindFirst` query results, by matching the item's ID.