Module: ReplTalk::GQL::Mutations

Includes:
Fields
Defined in:
lib/repltalk/graphql.rb

Constant Summary collapse

CREATE_POST =
"
	mutation createPost($input: CreatePostInput!) {
		createPost(input: $input) {
			post {
				#{Fields::POST}
			}
		}
	}
"
EDIT_POST =
"
	mutation updatePost($input: UpdatePostInput!) {
		updatePost(input: $input) {
			post {
				#{Fields::POST}
			}
		}
	}
"
DELETE_POST =
"
	mutation deletePost($id: Int!) {
		deletePost(id: $id) {
			id
		}
	}
"
CREATE_COMMENT =
"
	mutation createComment($input: CreateCommentInput!) {
		createComment(input: $input) {
			comment {
				#{Fields::COMMENT}
			}
		}
	}
"
EDIT_COMMENT =
"
	mutation updateComment($input: UpdateCommentInput!) {
		updateComment(input: $input) {
			comment {
				#{Fields::COMMENT}
			}
		}
	}
"
DELETE_COMMENT =
"
	mutation deleteComment($id: Int!) {
		deleteComment(id: $id) {
			id
		}
	}
"
CREATE_REPL_COMMENT =
"
	mutation ReplViewCreateReplComment($input: CreateReplCommentInput!) {
		createReplComment(input: $input) {
			... on ReplComment {
				#{Fields::REPL_COMMENT}
			}
		}
	}
"
REPLY_REPL_COMMENT =
"
	mutation ReplViewCreateReplCommentReply($input: CreateReplCommentReplyInput!) {
		createReplCommentReply(input: $input) {
			... on ReplComment {
				#{Fields::REPL_COMMENT}
			}
		}
	}
"
EDIT_REPL_COMMENT =
"
	mutation ReplViewCommentsUpdateReplComment($input: UpdateReplCommentInput!) {
		updateReplComment(input: $input) {
			... on ReplComment {
				#{Fields::REPL_COMMENT}
			}
		}
	}
"
DELETE_REPL_COMMENT =
"
	mutation ReplViewCommentsDeleteReplComment($id: Int!) {
		deleteReplComment(id: $id) {
			... on ReplComment {
				id
			}
		}
	}
"
PUBLISH_REPL =
"
	mutation PublishRepl($input: PublishReplInput!) {
		publishRepl(input: $input) {
			... on Repl {
				#{Fields::REPL}
			}
		}
	}
"
UNPUBLISH_REPL =
"
	mutation ReplViewHeaderActionsUnpublishRepl($input: UnpublishReplInput!) {
		unpublishRepl(input: $input) {
			... on Repl {
				#{Fields::REPL}
			}
		}
	}
"
REPORT_POST =
"
	mutation createBoardReport($id: Int!, $reason: String!) {
		createBoardReport(postId: $id, reason: $reason) {
			id
		}
	}
"
REPORT_COMMENT =
"
	mutation createBoardReport($id: Int!, $reason: String!) {
		createBoardReport(commentId: $id, reason: $reason) {
			id
		}
	}
"

Constants included from Fields

Fields::BOARD, Fields::COMMENT, Fields::LANGUAGE, Fields::POST, Fields::REPL, Fields::REPL_COMMENT, Fields::ROLES, Fields::TAG, Fields::USER