Added mutation key to features.
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 3m32s
All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 3m32s
This commit is contained in:
@@ -7,15 +7,18 @@ import increment from "#root/lib/graphql/mutations/incrimentMutation.js";
|
||||
const composer = new Composer<Context>();
|
||||
|
||||
const feature = composer.chatType("private");
|
||||
|
||||
const mutationKey = process.env.GRAPHQL_MUTATION_KEY || "";
|
||||
|
||||
/**
|
||||
* What triggers this feature and adds to the log when it has been triggered.
|
||||
* The trigger is the command "/start" or "start"
|
||||
*/
|
||||
feature.command("start", logHandle("command-start"), async ctx => {
|
||||
await urql.mutation(increment, { trigger: true });
|
||||
await urql.mutation(increment, { trigger: true, mutationKey });
|
||||
|
||||
await urql
|
||||
.mutation(increment, { command: true })
|
||||
.mutation(increment, { command: true, mutationKey })
|
||||
.toPromise()
|
||||
.then(async () => {
|
||||
if (ctx.msg) {
|
||||
|
||||
Reference in New Issue
Block a user