Skip to content

Commit 862bef3

Browse files
authored
Merge pull request #3281 from fpetrakov/fix-query-mutations-example-error
fix post put mock handler
2 parents 21dc923 + e4bb12b commit 862bef3

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)