diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-08-21 13:50:18 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-08-21 13:50:18 +0200 |
| commit | a3eb518dcccaebd0f48c708c189ad2fcb07f0f73 (patch) | |
| tree | 21d8350b85f47c41c382ef64ce0b91003d363a84 /src/ts/types/graphql | |
| parent | a0d00743cbbdb77b27c1a3d5711407ffed5befac (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/graphql')
| -rw-r--r-- | src/ts/types/graphql/queries.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ts/types/graphql/queries.ts b/src/ts/types/graphql/queries.ts index cc7b62b..c29eeb3 100644 --- a/src/ts/types/graphql/queries.ts +++ b/src/ts/types/graphql/queries.ts @@ -96,7 +96,7 @@ export type QueriesResponseMap<T> = { [articlesEndCursorQuery]: ArticlesResponse<EndCursorResponse>; [articlesQuery]: ArticlesResponse<EdgesResponse<T>>; [articlesSlugQuery]: ArticlesResponse<EdgesResponse<T>>; - [commentsQuery]: CommentsResponse<GraphQLNodes<T>>; + [commentsQuery]: CommentsResponse<EdgesResponse<T>>; [thematicBySlugQuery]: ThematicResponse<T>; [thematicsListQuery]: ThematicsResponse<EdgesResponse<T>>; [thematicsSlugQuery]: ThematicsResponse<EdgesResponse<T>>; @@ -128,7 +128,7 @@ export type QueriesInputMap = { [articlesEndCursorQuery]: QueryEdges & Search; [articlesQuery]: QueryEdges & Search; [articlesSlugQuery]: QueryEdges & Search; - [commentsQuery]: ContentId; + [commentsQuery]: ContentId & QueryEdges; [thematicBySlugQuery]: Slug; [thematicsListQuery]: QueryEdges & Search; [thematicsSlugQuery]: QueryEdges & Search; |
