aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/raw-data.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-08-21 13:50:18 +0200
committerArmand Philippot <git@armandphilippot.com>2022-08-21 13:50:18 +0200
commita3eb518dcccaebd0f48c708c189ad2fcb07f0f73 (patch)
tree21d8350b85f47c41c382ef64ce0b91003d363a84 /src/ts/types/raw-data.ts
parenta0d00743cbbdb77b27c1a3d5711407ffed5befac (diff)
fix(comments): load all comments on a post
Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types.
Diffstat (limited to 'src/ts/types/raw-data.ts')
-rw-r--r--src/ts/types/raw-data.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ts/types/raw-data.ts b/src/ts/types/raw-data.ts
index ae7f7c6..022016e 100644
--- a/src/ts/types/raw-data.ts
+++ b/src/ts/types/raw-data.ts
@@ -44,6 +44,12 @@ export type RawComment = {
parentDatabaseId: number;
};
+export type RawCommentsPage = {
+ comments: RawComment[];
+ hasNextPage: boolean;
+ endCursor: string;
+};
+
export type RawCover = {
altText: string;
mediaDetails: {