Skip to content

Commit f15bf28

Browse files
committed
add mutation docs
1 parent ddd4fc4 commit f15bf28

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ This DataSource has some built in mutation methods to create, update and delete
8888
```typescript
8989
await context.dataSources.users.createOne(userDoc);
9090

91-
await context.dataSources.uploads.deleteOne(uploadKey);
91+
await context.dataSources.users.updateOne(userDoc);
92+
93+
await context.dataSources.users.updateOnePartial(user_id, { name: "Bob" });
94+
95+
await context.dataSources.users.deleteOne(userId);
9296
```
9397

9498
The data loader (and cache, if used) are updated after mutation operations.

0 commit comments

Comments
 (0)