diff options
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/app.ts | 4 | ||||
| -rw-r--r-- | src/ts/types/graphql/queries.ts | 4 | ||||
| -rw-r--r-- | src/ts/types/raw-data.ts | 6 | 
3 files changed, 10 insertions, 4 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index 7bf1541..c11c31b 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -39,13 +39,13 @@ export type CommentMeta = {    date: string;  }; -export type Comment = { +export type SingleComment = {    approved: boolean;    content: string;    id: number;    meta: CommentMeta;    parentId?: number; -  replies: Comment[]; +  replies: SingleComment[];  };  export type Dates = { 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; 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: {  | 
