Error on mutation, use an argument to filter #2592
Closed
devstevehowe
started this conversation in
General
Replies: 1 comment
-
Adding @WhereKey behind the id solved the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am running a mutation to delete a single item:
mutation deleteFromCart($id: ID!, $store_id: ID $saved_cart_id: ID) { deleteFromCart(id: $id, store_id: $store_id, saved_cart_id: $saved_cart_id) { id } }
Then I pass the id, the store_id and the saved_cart_id.
Everything is stored in mongodb and adding to cart is just fine, updating works just fine, deleting the entire cart is fine but when I pass:
`{
"id": "66948e4ddb0c353ec104a7d2",
"store_id": "1",
"saved_cart_id": "669c065ed1b14b4eba0de752"
}`
Here's the mutation
deleteFromCart(id: ID!, store_id: ID, saved_cart_id: ID): SavedCartItem @delete
I get "Would modify all models, use an argument to filter."
Any help is appreciated
Beta Was this translation helpful? Give feedback.
All reactions