Set up mutation const newVote = gql(` mutation NewVote { updateVoteCount(input: {Finalist: "${Finalist}"}){ Finalist, Votes } } `); // Set up Apollo client const client = new AWSAppSyncClient({ url: url, region: region, auth: { type: type, credentials: AWS.config.credentials, }, disableOffline: true }); try { const newVoteResult = await client.mutate({ variables: { type: "variables", }, mutation: newVote, }); callback(null, { newVoteResult: newVoteResult, }); } catch (err) { callback(err); }