From ec66d502f6915d54f6da433376d1cbf2e95f6f7c Mon Sep 17 00:00:00 2001 From: Cameron Gilbert Date: Tue, 6 Feb 2024 18:00:10 -0500 Subject: [PATCH 1/3] fix: latest schema --- src/gql/query/marketing.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gql/query/marketing.ts b/src/gql/query/marketing.ts index 7e8939ed..2112e4ee 100644 --- a/src/gql/query/marketing.ts +++ b/src/gql/query/marketing.ts @@ -7,6 +7,7 @@ import { doGqlQuery, GQLLike, GQLMarketingQueryGqlLikesArgs, + GQLMarketingQueryGqlTasksArgs, GQLMarketingQueryGqlTweetsArgs, GQLMarketingQueryGqlTwitterUserArgs, gqlQuery, @@ -20,6 +21,7 @@ export type QueryMarketingArgs = { twitterUser?: Partial tweets?: Partial likes?: Partial + tasks?: Partial } export interface GqlOutMarketingQuery { From 2651ef8516a60dffe61448512bf7e13f7fd97781 Mon Sep 17 00:00:00 2001 From: Cameron Gilbert Date: Tue, 6 Feb 2024 18:03:52 -0500 Subject: [PATCH 2/3] fix: fix last commit --- src/gql/query/marketing.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/gql/query/marketing.ts b/src/gql/query/marketing.ts index 2112e4ee..c0aad8cc 100644 --- a/src/gql/query/marketing.ts +++ b/src/gql/query/marketing.ts @@ -74,10 +74,14 @@ export const marketingQueryString = ( ) } - // No args if (fields?.tasks) { marketingQuery.push( - gqlQuery("tasks", {}, convertObjectToPropertiesString(defaultTask), true) + gqlQuery( + "tasks", + args.likes ?? {}, + convertObjectToPropertiesString(fields.tasks), + true + ) ) } @@ -94,6 +98,17 @@ export const marketingQueryString = ( ) } + if (args.tasks && !fields?.tasks) { + marketingQuery.push( + gqlQuery( + "tasks", + args.tasks, + convertObjectToPropertiesString(defaultTask), + true + ) + ) + } + if (args.tweets && !fields?.tweets) { marketingQuery.push( gqlQuery( From d9c1bb312e0935f30e67bf2809b42a78379c5fee Mon Sep 17 00:00:00 2001 From: Cameron Gilbert Date: Tue, 6 Feb 2024 18:19:32 -0500 Subject: [PATCH 3/3] Update marketing.ts --- src/gql/query/marketing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gql/query/marketing.ts b/src/gql/query/marketing.ts index c0aad8cc..d81918b8 100644 --- a/src/gql/query/marketing.ts +++ b/src/gql/query/marketing.ts @@ -78,7 +78,7 @@ export const marketingQueryString = ( marketingQuery.push( gqlQuery( "tasks", - args.likes ?? {}, + args.tasks ?? {}, convertObjectToPropertiesString(fields.tasks), true )