refactor: introduce input in gql mutations

This commit is contained in:
Ali BARIN
2022-03-08 12:20:34 +01:00
committed by Ömer Faruk Aydın
parent f5f7a998ca
commit 030d886cf7
21 changed files with 67 additions and 39 deletions

View File

@@ -10,7 +10,7 @@ enum AuthenticationSteps {
const processMutation = async (step: IAuthenticationStep, variables: IJSONObject) => {
const mutation = MUTATIONS[step.name];
const mutationResponse = await apolloClient.mutate({ mutation, variables });
const mutationResponse = await apolloClient.mutate({ mutation, variables: { input: variables } });
const responseData = mutationResponse.data[step.name];
return responseData;