From 50d37beeb51c95aaead8b3ef2c946189a066486e Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 17 Dec 2021 23:29:10 +0100 Subject: chore: create mutation to add a new comment on posts --- src/ts/types/comments.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/ts/types/comments.ts') diff --git a/src/ts/types/comments.ts b/src/ts/types/comments.ts index 51852d0..a1bb120 100644 --- a/src/ts/types/comments.ts +++ b/src/ts/types/comments.ts @@ -26,3 +26,25 @@ export type RawComment = Omit & { export type CommentsResponse = { nodes: RawComment[]; }; + +export type CreatedComment = { + clientMutationId: string; + success: boolean; + comment: null | { + approved: boolean; + }; +}; + +export type CreatedCommentResponse = { + createComment: CreatedComment; +}; + +export type CreatedCommentReturn = ( + author: string, + authorEmail: string, + authorUrl: string, + content: string, + parent: number, + commentOn: number, + mutationId: string +) => Promise; -- cgit v1.2.3