I am trying to subscribe to changes on delete
, create
and update
mutations.
In my GraphQL schema, I created a subscription field that listens to all those mutations with type Subscription { onAll: Task @aws_subscribe(mutations: ["createTask","updateTask","deleteTask"]) }
Now when tried using amplify-vue components, in case of getting back a response :onSubscriptionMsg=SomeFunction(response)
I am receiving old list of tasks from response.data.listOfTasks
.
So how should I know which mutation was provoked and thus update the data.listOfTasks
?
Thanks a heap in advance for answering this question :)