Skip to content

Commit 08e71a4

Browse files
committed
Add create method
1 parent d685a82 commit 08e71a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/technical-details/reference/resource.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ This method may also be used to retrieve a collection of records by a query. If
288288
289289
This will save the provided record or data to this resource. This will fully replace the existing record. Make sure to `await` this function to ensure it finishes execution within the surrounding transaction.
290290
291+
### `create(record: object, context?: Resource|Context): Promise<void>`
292+
293+
This will save the provided record, generating a new id for the record. Make sure to `await` this function to ensure it finishes execution within the surrounding transaction.
294+
291295
### `patch(recordUpdate: object, context?: Resource|Context): Promise<void>`
292296
### `patch(id: Id, recordUpdate: object, context?: Resource|Context): Promise<void>`
293297

0 commit comments

Comments
 (0)