Reputation: 101
I am using Graphql within AWS AppSync. I can create items with no issues but when i try to delete one i get this error.
ConflictUnhandled - Conflict resolver rejects mutation.
i am using
deleteFavorite(input: {id: "ce8dfa4c-ef87-492e-9a87-f17d2f0b06c8", _version: 1})
from this auto created mutation
export const deleteFavorite = /* GraphQL */ `
mutation DeleteFavorite(
$input: DeleteFavoriteInput!
$condition: ModelFavoriteConditionInput
) {
deleteFavorite(input: $input, condition: $condition) {
id
productID
useremail
userID
_version
_deleted
_lastChangedAt
createdAt
updatedAt
}
}
`;
Upvotes: 2
Views: 696
Reputation: 101
The answer was to make sure i was passing the same _version back to the delete rewuest
Upvotes: 2