From 7ea2e49603b23cc866e26b121519ec39b67ab970 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 10 Dec 2024 18:33:16 +0100 Subject: [PATCH 1/4] Add admins mutations (#1007) --- packages/client/src/actions/admins.ts | 53 ++++++++++++++++++++++++ packages/client/src/actions/index.ts | 3 +- packages/graphql/src/admins.ts | 59 +++++++++++++++++++++++++++ packages/graphql/src/index.ts | 1 + 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 packages/client/src/actions/admins.ts create mode 100644 packages/graphql/src/admins.ts diff --git a/packages/client/src/actions/admins.ts b/packages/client/src/actions/admins.ts new file mode 100644 index 000000000..094fabfe7 --- /dev/null +++ b/packages/client/src/actions/admins.ts @@ -0,0 +1,53 @@ +import type { + AddAdminsRequest, + AddAdminsResult, + RemoveAdminsRequest, + RemoveAdminsResult, +} from '@lens-protocol/graphql'; +import { AddAdminsMutation, RemoveAdminsMutation } from '@lens-protocol/graphql'; +import type { ResultAsync } from '@lens-protocol/types'; + +import type { SessionClient } from '../clients'; +import type { UnauthenticatedError, UnexpectedError } from '../errors'; + +/** + * Add Admins + * + * ```ts + * const result = await addAdmins(sessionClient{ + * admins: [evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5')], + * address: evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5'), + * }); + * ``` + * + * @param client - The session client logged as a builder. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function addAdmins( + client: SessionClient, + request: AddAdminsRequest, +): ResultAsync { + return client.mutation(AddAdminsMutation, { request }); +} + +/** + * Remove admins + * + * ```ts + * const result = await removeAdmins(sessionClient{ + * admins: [evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5')], + * address: evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5'), + * }); + * ``` + * + * @param client - The session client for the authenticated Account. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function removeAdmins( + client: SessionClient, + request: RemoveAdminsRequest, +): ResultAsync { + return client.mutation(RemoveAdminsMutation, { request }); +} diff --git a/packages/client/src/actions/index.ts b/packages/client/src/actions/index.ts index d3c97fe25..9bafa0133 100644 --- a/packages/client/src/actions/index.ts +++ b/packages/client/src/actions/index.ts @@ -1,8 +1,9 @@ export * from './account'; +export * from './admins'; export * from './app'; export * from './authentication'; export * from './follow'; export * from './post'; export * from './posts'; -export * from './transactions'; export * from './timeline'; +export * from './transactions'; diff --git a/packages/graphql/src/admins.ts b/packages/graphql/src/admins.ts new file mode 100644 index 000000000..64edd50b2 --- /dev/null +++ b/packages/graphql/src/admins.ts @@ -0,0 +1,59 @@ +import type { FragmentOf } from 'gql.tada'; +import { + SelfFundedTransactionRequest, + SponsoredTransactionRequest, + TransactionWillFail, +} from './fragments'; +import { type RequestOf, graphql } from './graphql'; + +const AddAdminsResult = graphql( + `fragment AddAdminsResult on AddAdminsResult { + ...on SponsoredTransactionRequest { + ...SponsoredTransactionRequest + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [SponsoredTransactionRequest, SelfFundedTransactionRequest, TransactionWillFail], +); +export type AddAdminsResult = FragmentOf; + +export const AddAdminsMutation = graphql( + `mutation AddAdmins($request: AddAdminsRequest!) { + value: addAdmins(request: $request) { + ...AddAdminsResult + } + }`, + [AddAdminsResult], +); +export type AddAdminsRequest = RequestOf; + +const RemoveAdminsResult = graphql( + `fragment RemoveAdminsResult on RemoveAdminsResult { + ...on SponsoredTransactionRequest { + ...SponsoredTransactionRequest + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [SponsoredTransactionRequest, SelfFundedTransactionRequest, TransactionWillFail], +); +export type RemoveAdminsResult = FragmentOf; + +export const RemoveAdminsMutation = graphql( + `mutation RemoveAdmins($request: RemoveAdminsRequest!) { + value: removeAdmins(request: $request) { + ...RemoveAdminsResult + } + }`, + [RemoveAdminsResult], +); +export type RemoveAdminsRequest = RequestOf; diff --git a/packages/graphql/src/index.ts b/packages/graphql/src/index.ts index a4190f76b..def1cea07 100644 --- a/packages/graphql/src/index.ts +++ b/packages/graphql/src/index.ts @@ -1,4 +1,5 @@ export * from './accounts'; +export * from './admins'; export * from './app'; export * from './authentication'; export * from './enums'; From 6d01070f05095a9eac3d482127dc71544167c0b1 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 10 Dec 2024 18:34:23 +0100 Subject: [PATCH 2/4] Implement group mutations (#1006) --- packages/client/src/actions/group.ts | 71 +++++++++++++++ packages/client/src/actions/index.ts | 1 + packages/graphql/src/group.ts | 125 +++++++++++++++++++++++++++ packages/graphql/src/index.ts | 1 + 4 files changed, 198 insertions(+) create mode 100644 packages/client/src/actions/group.ts create mode 100644 packages/graphql/src/group.ts diff --git a/packages/client/src/actions/group.ts b/packages/client/src/actions/group.ts new file mode 100644 index 000000000..6932272d9 --- /dev/null +++ b/packages/client/src/actions/group.ts @@ -0,0 +1,71 @@ +import type { + CreateGroupRequest, + CreateGroupResult, + JoinGroupRequest, + JoinGroupResult, + LeaveGroupRequest, + LeaveGroupResult, +} from '@lens-protocol/graphql'; +import { CreateGroupMutation, JoinGroupMutation, LeaveGroupMutation } from '@lens-protocol/graphql'; +import type { ResultAsync } from '@lens-protocol/types'; + +import type { SessionClient } from '../clients'; +import type { UnauthenticatedError, UnexpectedError } from '../errors'; + +/** + * Create a Group + * + * ```ts + * const result = await createGroup(sessionClient); + * ``` + * + * @param client - The session client logged as a builder. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function createGroup( + client: SessionClient, + request: CreateGroupRequest, +): ResultAsync { + return client.mutation(CreateGroupMutation, { request }); +} + +/** + * Join a Group + * + * ```ts + * const result = await joinGroup(sessionClient, { + * group: evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5'), + * }); + * ``` + * + * @param client - The session client for the authenticated Account. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function joinGroup( + client: SessionClient, + request: JoinGroupRequest, +): ResultAsync { + return client.mutation(JoinGroupMutation, { request }); +} + +/** + * Leave a Group + * + * ```ts + * const result = await leaveGroup(sessionClient, { + * group: evmAddress('0xe2f2a5C287993345a840db3B0845fbc70f5935a5'), + * }); + * ``` + * + * @param client - The session client for the authenticated Account. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function leaveGroup( + client: SessionClient, + request: LeaveGroupRequest, +): ResultAsync { + return client.mutation(LeaveGroupMutation, { request }); +} diff --git a/packages/client/src/actions/index.ts b/packages/client/src/actions/index.ts index 9bafa0133..b26b6e09b 100644 --- a/packages/client/src/actions/index.ts +++ b/packages/client/src/actions/index.ts @@ -3,6 +3,7 @@ export * from './admins'; export * from './app'; export * from './authentication'; export * from './follow'; +export * from './group'; export * from './post'; export * from './posts'; export * from './timeline'; diff --git a/packages/graphql/src/group.ts b/packages/graphql/src/group.ts new file mode 100644 index 000000000..848d58e49 --- /dev/null +++ b/packages/graphql/src/group.ts @@ -0,0 +1,125 @@ +import type { FragmentOf } from 'gql.tada'; +import { + SelfFundedTransactionRequest, + SponsoredTransactionRequest, + TransactionWillFail, +} from './fragments'; +import { type RequestOf, graphql } from './graphql'; + +const CreateGroupResponse = graphql( + `fragment CreateGroupResponse on CreateGroupResponse { + __typename + hash + }`, +); +export type CreateGroupResponse = FragmentOf; + +const CreateGroupResult = graphql( + `fragment CreateGroupResult on CreateGroupResult { + ...on CreateGroupResponse { + ...CreateGroupResponse + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [CreateGroupResponse, SelfFundedTransactionRequest, TransactionWillFail], +); +export type CreateGroupResult = FragmentOf; + +export const CreateGroupMutation = graphql( + `mutation CreateGroup($request: CreateGroupRequest!) { + value: createGroup(request: $request) { + ...CreateGroupResult + } + }`, + [CreateGroupResult], +); +export type CreateGroupRequest = RequestOf; + +const JoinGroupResponse = graphql( + `fragment JoinGroupResponse on JoinGroupResponse { + __typename + hash + }`, +); +export type JoinGroupResponse = FragmentOf; + +const JoinGroupResult = graphql( + `fragment JoinGroupResult on JoinGroupResult { + ...on JoinGroupResponse { + ...JoinGroupResponse + } + ...on SponsoredTransactionRequest { + ...SponsoredTransactionRequest + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [ + SponsoredTransactionRequest, + SelfFundedTransactionRequest, + TransactionWillFail, + JoinGroupResponse, + ], +); +export type JoinGroupResult = FragmentOf; + +export const JoinGroupMutation = graphql( + `mutation JoinGroup($request: JoinGroupRequest!) { + value: joinGroup(request: $request) { + ...JoinGroupResult + } + }`, + [JoinGroupResult], +); +export type JoinGroupRequest = RequestOf; + +const LeaveGroupResponse = graphql( + `fragment LeaveGroupResponse on LeaveGroupResponse { + __typename + hash + }`, +); +export type LeaveGroupResponse = FragmentOf; + +const LeaveGroupResult = graphql( + `fragment LeaveGroupResult on LeaveGroupResult { + ...on LeaveGroupResponse { + ...LeaveGroupResponse + } + ...on SponsoredTransactionRequest { + ...SponsoredTransactionRequest + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [ + SponsoredTransactionRequest, + SelfFundedTransactionRequest, + TransactionWillFail, + LeaveGroupResponse, + ], +); +export type LeaveGroupResult = FragmentOf; + +export const LeaveGroupMutation = graphql( + `mutation LeaveGroup($request: LeaveGroupRequest!) { + value: leaveGroup(request: $request) { + ...LeaveGroupResult + } + }`, + [LeaveGroupResult], +); +export type LeaveGroupRequest = RequestOf; diff --git a/packages/graphql/src/index.ts b/packages/graphql/src/index.ts index def1cea07..d3b8f5ec1 100644 --- a/packages/graphql/src/index.ts +++ b/packages/graphql/src/index.ts @@ -6,6 +6,7 @@ export * from './enums'; export * from './follow'; export * from './fragments'; export * from './graphql'; +export * from './group'; export * from './health'; export * from './notifications'; export * from './post'; From 0f60ed62929370c1d7ce811c9c269ee8f53105ff Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 10 Dec 2024 18:36:24 +0100 Subject: [PATCH 3/4] Implement creation for feed/graph/namespace (#1005) --- packages/client/src/actions/feed.ts | 24 +++++++++++++++ packages/client/src/actions/graph.ts | 24 +++++++++++++++ packages/client/src/actions/index.ts | 3 ++ packages/client/src/actions/namespace.ts | 30 +++++++++++++++++++ packages/graphql/src/feed.ts | 37 ++++++++++++++++++++++++ packages/graphql/src/graph.ts | 37 ++++++++++++++++++++++++ packages/graphql/src/index.ts | 3 ++ packages/graphql/src/namespace.ts | 37 ++++++++++++++++++++++++ 8 files changed, 195 insertions(+) create mode 100644 packages/client/src/actions/feed.ts create mode 100644 packages/client/src/actions/graph.ts create mode 100644 packages/client/src/actions/namespace.ts create mode 100644 packages/graphql/src/feed.ts create mode 100644 packages/graphql/src/graph.ts create mode 100644 packages/graphql/src/namespace.ts diff --git a/packages/client/src/actions/feed.ts b/packages/client/src/actions/feed.ts new file mode 100644 index 000000000..ee7533cf9 --- /dev/null +++ b/packages/client/src/actions/feed.ts @@ -0,0 +1,24 @@ +import type { CreateFeedRequest, CreateFeedResult } from '@lens-protocol/graphql'; +import { CreateFeedMutation } from '@lens-protocol/graphql'; +import type { ResultAsync } from '@lens-protocol/types'; + +import type { SessionClient } from '../clients'; +import type { UnauthenticatedError, UnexpectedError } from '../errors'; + +/** + * Create a Feed + * + * ```ts + * const result = await createFeed(sessionClient); + * ``` + * + * @param client - The session client logged as a builder. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function createFeed( + client: SessionClient, + request: CreateFeedRequest, +): ResultAsync { + return client.mutation(CreateFeedMutation, { request }); +} diff --git a/packages/client/src/actions/graph.ts b/packages/client/src/actions/graph.ts new file mode 100644 index 000000000..75ac6145e --- /dev/null +++ b/packages/client/src/actions/graph.ts @@ -0,0 +1,24 @@ +import type { CreateGraphRequest, CreateGraphResult } from '@lens-protocol/graphql'; +import { CreateGraphMutation } from '@lens-protocol/graphql'; +import type { ResultAsync } from '@lens-protocol/types'; + +import type { SessionClient } from '../clients'; +import type { UnauthenticatedError, UnexpectedError } from '../errors'; + +/** + * Create a Graph + * + * ```ts + * const result = await createGraph(sessionClient); + * ``` + * + * @param client - The session client logged as a builder. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function createGraph( + client: SessionClient, + request: CreateGraphRequest, +): ResultAsync { + return client.mutation(CreateGraphMutation, { request }); +} diff --git a/packages/client/src/actions/index.ts b/packages/client/src/actions/index.ts index b26b6e09b..0e9aa64d7 100644 --- a/packages/client/src/actions/index.ts +++ b/packages/client/src/actions/index.ts @@ -2,7 +2,10 @@ export * from './account'; export * from './admins'; export * from './app'; export * from './authentication'; +export * from './feed'; export * from './follow'; +export * from './graph'; +export * from './namespace'; export * from './group'; export * from './post'; export * from './posts'; diff --git a/packages/client/src/actions/namespace.ts b/packages/client/src/actions/namespace.ts new file mode 100644 index 000000000..f4a22c2df --- /dev/null +++ b/packages/client/src/actions/namespace.ts @@ -0,0 +1,30 @@ +import type { + CreateUsernameNamespaceRequest, + CreateUsernameNamespaceResult, +} from '@lens-protocol/graphql'; +import { CreateUsernameNamespaceMutation } from '@lens-protocol/graphql'; +import type { ResultAsync } from '@lens-protocol/types'; + +import type { SessionClient } from '../clients'; +import type { UnauthenticatedError, UnexpectedError } from '../errors'; + +/** + * Create a Namespace + * + * ```ts + * const result = await createUsernameNamespace(sessionClient, { + * symbol: 'NAME', + * namespace: 'custom-namespace', + * }); + * ``` + * + * @param client - The session client logged as a builder. + * @param request - The mutation request. + * @returns Tiered transaction result. + */ +export function createUsernameNamespace( + client: SessionClient, + request: CreateUsernameNamespaceRequest, +): ResultAsync { + return client.mutation(CreateUsernameNamespaceMutation, { request }); +} diff --git a/packages/graphql/src/feed.ts b/packages/graphql/src/feed.ts new file mode 100644 index 000000000..166312318 --- /dev/null +++ b/packages/graphql/src/feed.ts @@ -0,0 +1,37 @@ +import type { FragmentOf } from 'gql.tada'; +import { SelfFundedTransactionRequest, TransactionWillFail } from './fragments'; +import { type RequestOf, graphql } from './graphql'; + +const CreateFeedResponse = graphql( + `fragment CreateFeedResponse on CreateFeedResponse { + __typename + hash + }`, +); +export type CreateFeedResponse = FragmentOf; + +const CreateFeedResult = graphql( + `fragment CreateFeedResult on CreateFeedResult { + ...on CreateFeedResponse { + ...CreateFeedResponse + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [CreateFeedResponse, SelfFundedTransactionRequest, TransactionWillFail], +); +export type CreateFeedResult = FragmentOf; + +export const CreateFeedMutation = graphql( + `mutation CreateFeed($request: CreateFeedRequest!) { + value: createFeed(request: $request) { + ...CreateFeedResult + } + }`, + [CreateFeedResult], +); +export type CreateFeedRequest = RequestOf; diff --git a/packages/graphql/src/graph.ts b/packages/graphql/src/graph.ts new file mode 100644 index 000000000..2e19d76ed --- /dev/null +++ b/packages/graphql/src/graph.ts @@ -0,0 +1,37 @@ +import type { FragmentOf } from 'gql.tada'; +import { SelfFundedTransactionRequest, TransactionWillFail } from './fragments'; +import { type RequestOf, graphql } from './graphql'; + +const CreateGraphResponse = graphql( + `fragment CreateGraphResponse on CreateGraphResponse { + __typename + hash + }`, +); +export type CreateGraphResponse = FragmentOf; + +const CreateGraphResult = graphql( + `fragment CreateGraphResult on CreateGraphResult { + ...on CreateGraphResponse { + ...CreateGraphResponse + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [CreateGraphResponse, SelfFundedTransactionRequest, TransactionWillFail], +); +export type CreateGraphResult = FragmentOf; + +export const CreateGraphMutation = graphql( + `mutation CreateGraph($request: CreateGraphRequest!) { + value: createGraph(request: $request) { + ...CreateGraphResult + } + }`, + [CreateGraphResult], +); +export type CreateGraphRequest = RequestOf; diff --git a/packages/graphql/src/index.ts b/packages/graphql/src/index.ts index d3b8f5ec1..7d52922c5 100644 --- a/packages/graphql/src/index.ts +++ b/packages/graphql/src/index.ts @@ -3,11 +3,14 @@ export * from './admins'; export * from './app'; export * from './authentication'; export * from './enums'; +export * from './feed'; export * from './follow'; export * from './fragments'; +export * from './graph'; export * from './graphql'; export * from './group'; export * from './health'; +export * from './namespace'; export * from './notifications'; export * from './post'; export * from './timeline'; diff --git a/packages/graphql/src/namespace.ts b/packages/graphql/src/namespace.ts new file mode 100644 index 000000000..aee15631c --- /dev/null +++ b/packages/graphql/src/namespace.ts @@ -0,0 +1,37 @@ +import type { FragmentOf } from 'gql.tada'; +import { SelfFundedTransactionRequest, TransactionWillFail } from './fragments'; +import { type RequestOf, graphql } from './graphql'; + +const CreateNamespaceResponse = graphql( + `fragment CreateNamespaceResponse on CreateNamespaceResponse { + __typename + hash + }`, +); +export type CreateNamespaceResponse = FragmentOf; + +const CreateUsernameNamespaceResult = graphql( + `fragment CreateUsernameNamespaceResult on CreateUsernameNamespaceResult { + ...on CreateNamespaceResponse { + ...CreateNamespaceResponse + } + ...on SelfFundedTransactionRequest { + ...SelfFundedTransactionRequest + } + ...on TransactionWillFail { + ...TransactionWillFail + } + }`, + [CreateNamespaceResponse, SelfFundedTransactionRequest, TransactionWillFail], +); +export type CreateUsernameNamespaceResult = FragmentOf; + +export const CreateUsernameNamespaceMutation = graphql( + `mutation CreateUsernameNamespace($request: CreateUsernameNamespaceRequest!) { + value: createUsernameNamespace(request: $request) { + ...CreateUsernameNamespaceResult + } + }`, + [CreateUsernameNamespaceResult], +); +export type CreateUsernameNamespaceRequest = RequestOf; From ab16f964e23669f5b5126d97579bc259e8bdae6c Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 10 Dec 2024 18:37:10 +0100 Subject: [PATCH 4/4] Implement missing mutations for publications (#1004) --- packages/client/src/actions/post.ts | 67 +++++++++++++++++++++++++++++ packages/graphql/src/post.ts | 21 +++++++++ 2 files changed, 88 insertions(+) diff --git a/packages/client/src/actions/post.ts b/packages/client/src/actions/post.ts index 84fcaab30..6b8d941d7 100644 --- a/packages/client/src/actions/post.ts +++ b/packages/client/src/actions/post.ts @@ -7,23 +7,29 @@ import type { DeletePostRequest, DeletePostResult, EditPostRequest, + HideReplyRequest, PostResult, UndoBookmarkPostRequest, UndoReactionRequest, UndoReactionResult, + UnhideReplyRequest, } from '@lens-protocol/graphql'; import { AddReactionMutation, BookmarkPostMutation, DeletePostMutation, EditPostMutation, + HideReplyMutation, PostMutation, + ReportPostMutation, RepostMutation, UndoBookmarkPostMutation, UndoReactionMutation, + UnhideReplyMutation, } from '@lens-protocol/graphql'; import type { ResultAsync } from '@lens-protocol/types'; +import type { ReportPostRequest } from '@lens-protocol/graphql'; import type { SessionClient } from '../clients'; import type { UnauthenticatedError, UnexpectedError } from '../errors'; @@ -189,3 +195,64 @@ export function undoBookmarkPost( ): ResultAsync { return client.mutation(UndoBookmarkPostMutation, { request }); } + +/** + * Hide a reply. + * + * ```ts + * const result = await hideReply(sessionClient, { + * post: post.id, + * }); + * ``` + * + * @param client - The session client. + * @param request - The mutation request. + * @returns void + */ +export function hideReply( + client: SessionClient, + request: HideReplyRequest, +): ResultAsync { + return client.mutation(HideReplyMutation, { request }); +} + +/** + * Unhide a reply. + * + * ```ts + * const result = await unhideReply(sessionClient, { + * post: post.id, + * }); + * ``` + * + * @param client - The session client. + * @param request - The mutation request. + * @returns void + */ +export function unhideReply( + client: SessionClient, + request: UnhideReplyRequest, +): ResultAsync { + return client.mutation(UnhideReplyMutation, { request }); +} + +/** + * Report a post + * + * ```ts + * const result = await reportPost(sessionClient, { + * reason: "SCAM", + * post: post.id, + * }); + * ``` + * + * @param client - The session client. + * @param request - The mutation request. + * @returns void + */ +export function reportPost( + client: SessionClient, + request: ReportPostRequest, +): ResultAsync { + return client.mutation(ReportPostMutation, { request }); +} diff --git a/packages/graphql/src/post.ts b/packages/graphql/src/post.ts index 36d2ebd0f..4fa8e3fb3 100644 --- a/packages/graphql/src/post.ts +++ b/packages/graphql/src/post.ts @@ -240,3 +240,24 @@ export const DeletePostMutation = graphql( [DeletePostResult], ); export type DeletePostRequest = RequestOf; + +export const HideReplyMutation = graphql( + `mutation HideReply($request: HideReplyRequest!) { + value: hideReply(request: $request) + }`, +); +export type HideReplyRequest = RequestOf; + +export const UnhideReplyMutation = graphql( + `mutation UnhideReply($request: UnhideReplyRequest!) { + value: unhideReply(request: $request) + }`, +); +export type UnhideReplyRequest = RequestOf; + +export const ReportPostMutation = graphql( + `mutation ReportPost($request: ReportPostRequest!) { + value: reportPost(request: $request) + }`, +); +export type ReportPostRequest = RequestOf;