This method will generate an array of mutation documents based on the changes between the original and the current values.
It will detect the added and removed items using the key and will call the generateCreateMutation, generateDeleteMutation, generateUpdateMutation for each of the differences.
The methods are expected to return the GraphQL mutation call that needs to be executed to perform that adding or removing on the backend service.
The method will return an array with all create and delete mutations that were created.
The result can be used to wrap it into a GraphQL mutation like that:
This method will generate an array of mutation documents based on the changes between the
original
and thecurrent
values. It will detect the added and removed items using thekey
and will call thegenerateCreateMutation
,generateDeleteMutation
,generateUpdateMutation
for each of the differences. The methods are expected to return the GraphQL mutation call that needs to be executed to perform that adding or removing on the backend service.The method will return an array with all create and delete mutations that were created. The result can be used to wrap it into a GraphQL
mutation
like that: