Skip to content

Commit e4bb12b

Browse files
committed
fix post put mock handler
1 parent 0734dad commit e4bb12b

File tree

1 file changed

+5
-1
lines changed
  • examples/query/react/mutations/src/mocks

1 file changed

+5
-1
lines changed

examples/query/react/mutations/src/mocks/db.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export const handlers = [
5151
const id = Array.isArray(req.params.id) ? req.params.id[0] : req.params.id
5252

5353
const post = db.post.update({
54-
where: { id },
54+
where: {
55+
id: {
56+
equals: id,
57+
},
58+
},
5559
data: { name },
5660
})
5761

0 commit comments

Comments
 (0)