From 43ac20deb39d8afa83b9e72155caad56cb7c0244 Mon Sep 17 00:00:00 2001 From: devformatters2 <177856586+devformatters2@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:09:33 +0800 Subject: [PATCH] fix(campaign): add `id` to campaign detail query --- src/views/ArticleDetail/Header/gql.ts | 1 + src/views/CampaignDetail/Apply/Dialog/index.tsx | 1 + src/views/CampaignDetail/ArticleFeeds/MainFeed/gql.ts | 1 + src/views/CampaignDetail/gql.ts | 2 ++ 4 files changed, 5 insertions(+) diff --git a/src/views/ArticleDetail/Header/gql.ts b/src/views/ArticleDetail/Header/gql.ts index 4bfaee969a..1bbed3ca0c 100644 --- a/src/views/ArticleDetail/Header/gql.ts +++ b/src/views/ArticleDetail/Header/gql.ts @@ -9,6 +9,7 @@ export const fragments = { id shortHash ... on WritingChallenge { + id nameZhHant: name(input: { language: zh_hant }) nameZhHans: name(input: { language: zh_hans }) nameEn: name(input: { language: en }) diff --git a/src/views/CampaignDetail/Apply/Dialog/index.tsx b/src/views/CampaignDetail/Apply/Dialog/index.tsx index b6193e0b33..e865e15a74 100644 --- a/src/views/CampaignDetail/Apply/Dialog/index.tsx +++ b/src/views/CampaignDetail/Apply/Dialog/index.tsx @@ -13,6 +13,7 @@ const APPLY_CAMPAIGN = gql` applyCampaign(input: { id: $id }) { id ... on WritingChallenge { + id application { state createdAt diff --git a/src/views/CampaignDetail/ArticleFeeds/MainFeed/gql.ts b/src/views/CampaignDetail/ArticleFeeds/MainFeed/gql.ts index 717910f8a2..9955008616 100644 --- a/src/views/CampaignDetail/ArticleFeeds/MainFeed/gql.ts +++ b/src/views/CampaignDetail/ArticleFeeds/MainFeed/gql.ts @@ -11,6 +11,7 @@ export const CAMPAIGN_ARTICLES_PUBLIC = gql` campaign(input: { shortHash: $shortHash }) { id ... on WritingChallenge { + id articles(input: { first: 20, after: $after, filter: $filter }) { pageInfo { startCursor diff --git a/src/views/CampaignDetail/gql.ts b/src/views/CampaignDetail/gql.ts index 4c9c77d041..63e3230525 100644 --- a/src/views/CampaignDetail/gql.ts +++ b/src/views/CampaignDetail/gql.ts @@ -12,6 +12,7 @@ export const CAMPAIGN_DETAIL = gql` id shortHash ... on WritingChallenge { + id descriptionZhHant: description(input: { language: zh_hant }) descriptionZhHans: description(input: { language: zh_hans }) descriptionEn: description(input: { language: en }) @@ -35,6 +36,7 @@ export const GET_PARTICIPANTS = gql` campaign(input: { shortHash: $shortHash }) { id ... on WritingChallenge { + id application { state }