{"meta":{"title":"토론에 GraphQL API 사용","intro":"GraphQL API를 GitHub Discussions 사용하는 방법을 알아봅니다.","product":"GraphQL API","breadcrumbs":[{"href":"/ko/graphql","title":"GraphQL API"},{"href":"/ko/graphql/guides","title":"안내서"},{"href":"/ko/graphql/guides/using-the-graphql-api-for-discussions","title":"토론에 GraphQL 사용하기"}],"documentType":"article"},"body":"# 토론에 GraphQL API 사용\n\nGraphQL API를 GitHub Discussions 사용하는 방법을 알아봅니다.\n\nGitHub Discussions GraphQL API를 사용하면 토론 게시물을 다운로드, 만들기, 편집 및 삭제할 수 있습니다.\nGitHub Discussions에 대한 자세한 내용은 [토론에 대한 정보](/ko/discussions/collaborating-with-your-community-using-discussions/about-discussions)을(를) 참조하세요.\n\n이 API는 인증된 사용자, OAuth apps 및 GitHub 앱에서 사용할 수 있습니다. 액세스 토큰에는 프라이빗 리포지토리의 `repo` 범위와 퍼블릭 리포지토리의 `public_repo` 범위가 필요합니다. 자세한 내용은 [OAuth 앱에 대한 범위](/ko/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps)을(를) 참조하세요.\n\n## 필드\n\n### 저장소.토론\n\n리포지토리 내의 토론을 나열합니다.\n`categoryId`를 지정하면 해당 범주 내의 결과만 반환됩니다.\n`answered`를 지정하지 않으면 답변된 토론 및 답변되지 않은 토론이 모두 반환됩니다.\n\n서명:\\_\\_\n\n```graphql\ndiscussions(\n  after: String,\n  before: String,\n  first: Int,\n  last: Int,\n  categoryId: ID = null,\n  \n  answered: Boolean = null,\n  \n  orderBy: DiscussionOrder = {field: UPDATED_AT, direction: DESC}\n) : Discussion\n```\n\n#### DiscussionOrder\n\n```graphql\n\"\"\"\nWays in which discussions can be ordered.\n\"\"\"\ninput DiscussionOrder {\n  \"\"\"\n  The field by which to order discussions.\n  \"\"\"\n  field: DiscussionOrderField!\n\n  \"\"\"\n  The direction in which to order discussions by the specified field.\n  \"\"\"\n  direction: OrderDirection!\n}\n```\n\n```graphql\n\"\"\"\nProperties by which discussion connections can be ordered.\n\"\"\"\nenum DiscussionOrderField {\n  \"\"\"\n  Order discussions by creation time.\n  \"\"\"\n  CREATED_AT\n\n  \"\"\"\n  Order discussions by most recent modification time.\n  \"\"\"\n  UPDATED_AT\n}\n```\n\n### 저장소.토론카테고리\n\n이 리포지토리 내에 정의된 사용 가능한 토론 범주를 반환합니다. 각 리포지토리에는 최대 25개의 범주가 있을 수 있습니다. 토론 범주에 관한 자세한 내용은 [토론 범주 관리](/ko/discussions/managing-discussions-for-your-community/managing-categories-for-discussions#about-categories-for-discussions)을(를) 참조하세요.\n\n서명:\\_\\_\n\n```graphql\ndiscussionCategories(\n  after: String,\n  before: String,\n  first: Int,\n  last: Int,\n) : DiscussionCategoryConnection!\n```\n\n### 저장소.논의\n\n토론을 시작하세요. 지정된 ID를 사용하는 토론이 없는 경우 `null`을 반환합니다.\n\n서명:\\_\\_\n\n```graphql\ndiscussion(number: Int!) : Discussion\n```\n\n### Repository.pinnedDiscussions\n\n이 리포지토리에 고정된 토론을 고정 위치로 정렬하여 반환합니다.\n\n서명:\\_\\_\n\n```graphql\npinnedDiscussions(\n  after: String,\n  before: String,\n  first: Int,\n  last: Int,\n) : PinnedDiscussionConnection!\n```\n\n## 개체\n\n**참고:** 간단히 말하면 연결 형식은 여기서 확장되지 않습니다. 스키마에서 언급된 각 연결 형식은 GraphQL API의 다른 연결과 동일한 패턴을 따릅니다. 자세한 내용은 [GraphQL 소개](/ko/graphql/guides/introduction-to-graphql#connection)을(를) 참조하세요.\n\n```graphql\nquery {\n  repository(owner: \"github\", name: \"some-repo\") {\n    discussions(first: 10) {\n      # type: DiscussionConnection\n      totalCount # Int!\n\n      pageInfo {\n        # type: PageInfo (from the public schema)\n        startCursor\n        endCursor\n        hasNextPage\n        hasPreviousPage\n      }\n\n      edges {\n        # type: DiscussionEdge\n        cursor\n        node {\n          # type: Discussion\n          id\n        }\n      }\n\n      nodes {\n        # type: Discussion\n        id\n      }\n    }\n  }\n}\n```\n\n### 토론(Discussion)\n\n<details>\n<summary>필드:</summary>\n\n```graphql\n\"\"\"\nA discussion in a repository.\n\"\"\"\ntype Discussion implements Comment & Deletable & Lockable & Node & Reactable & RepositoryNode & Subscribable & Updatable {\n  \"\"\"\n  Reason that the conversation was locked.\n  \"\"\"\n  activeLockReason: LockReason\n\n  \n  \"\"\"\n  Check if this discussion has been answered\n  \"\"\"\n  isAnswered: Boolean!\n  \n\n  \"\"\"\n  The comment chosen as this discussion's answer, if any.\n  \"\"\"\n  answer: DiscussionComment\n\n  \"\"\"\n  The time when a user chose this discussion's answer, if answered.\n  \"\"\"\n  answerChosenAt: DateTime\n\n  \"\"\"\n  The user who chose this discussion's answer, if answered.\n  \"\"\"\n  answerChosenBy: Actor\n\n  \"\"\"\n  The actor who authored the comment.\n  \"\"\"\n  author: Actor\n\n  \"\"\"\n  Author's association with the subject of the comment.\n  \"\"\"\n  authorAssociation: CommentAuthorAssociation!\n\n  \"\"\"\n  The main text of the discussion post.\n  \"\"\"\n  body: String!\n\n  \"\"\"\n  The body rendered to HTML.\n  \"\"\"\n  bodyHTML: HTML!\n\n  \"\"\"\n  The body rendered to text.\n  \"\"\"\n  bodyText: String!\n\n  \"\"\"\n  The category for this discussion.\n  \"\"\"\n  category: DiscussionCategory!\n\n  \"\"\"\n  The replies to the discussion.\n  \"\"\"\n  comments(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n  ): DiscussionCommentConnection!\n\n  \"\"\"\n  Identifies the date and time when the object was created.\n  \"\"\"\n  createdAt: DateTime!\n\n  \"\"\"\n  Check if this comment was created via an email reply.\n  \"\"\"\n  createdViaEmail: Boolean!\n\n  \"\"\"\n  Identifies the primary key from the database.\n  \"\"\"\n  databaseId: Int\n\n  \"\"\"\n  The actor who edited the comment.\n  \"\"\"\n  editor: Actor\n  id: ID!\n\n  \"\"\"\n  Check if this comment was edited and includes an edit with the creation data\n  \"\"\"\n  includesCreatedEdit: Boolean!\n\n  \"\"\"\n  The moment the editor made the last edit\n  \"\"\"\n  lastEditedAt: DateTime\n\n  \"\"\"\n  `true` if the object is locked\n  \"\"\"\n  locked: Boolean!\n\n  \"\"\"\n  The number identifying this discussion within the repository.\n  \"\"\"\n  number: Int!\n\n  \"\"\"\n  Identifies when the comment was published at.\n  \"\"\"\n  publishedAt: DateTime\n\n  \"\"\"\n  A list of reactions grouped by content left on the subject.\n  \"\"\"\n  reactionGroups: [ReactionGroup!]\n\n  \"\"\"\n  A list of Reactions left on the Issue.\n  \"\"\"\n  reactions(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Allows filtering Reactions by emoji.\n    \"\"\"\n    content: ReactionContent\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n\n    \"\"\"\n    Allows specifying the order in which reactions are returned.\n    \"\"\"\n    orderBy: ReactionOrder\n  ): ReactionConnection!\n\n  \"\"\"\n  The repository associated with this node.\n  \"\"\"\n  repository: Repository!\n\n  \"\"\"\n  The path for this discussion.\n  \"\"\"\n  resourcePath: URI!\n\n  \"\"\"\n  The title of this discussion.\n  \"\"\"\n  title: String!\n\n  \"\"\"\n  Identifies the date and time when the object was last updated.\n  \"\"\"\n  updatedAt: DateTime!\n\n  \"\"\"\n  The URL for this discussion.\n  \"\"\"\n  url: URI!\n\n  \"\"\"\n  A list of edits to this content.\n  \"\"\"\n  userContentEdits(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n  ): UserContentEditConnection\n\n  \"\"\"\n  Check if the current viewer can delete this object.\n  \"\"\"\n  viewerCanDelete: Boolean!\n\n  \"\"\"\n  Can user react to this subject\n  \"\"\"\n  viewerCanReact: Boolean!\n\n  \"\"\"\n  Check if the viewer is able to change their subscription status for the repository.\n  \"\"\"\n  viewerCanSubscribe: Boolean!\n\n  \"\"\"\n  Check if the current viewer can update this object.\n  \"\"\"\n  viewerCanUpdate: Boolean!\n\n  \"\"\"\n  Did the viewer author this comment.\n  \"\"\"\n  viewerDidAuthor: Boolean!\n\n  \"\"\"\n  Identifies if the viewer is watching, not watching, or ignoring the subscribable entity.\n  \"\"\"\n  viewerSubscription: SubscriptionState\n}\n```\n\n</details>\n\n### 토론 댓글\n\n<details>\n<summary>필드</summary>\n\n```graphql\n\"\"\"\nA comment on a discussion.\n\"\"\"\ntype DiscussionComment implements Comment & Deletable & Minimizable & Node & Reactable & Updatable & UpdatableComment {\n  \"\"\"\n  The actor who authored the comment.\n  \"\"\"\n  author: Actor\n\n  \"\"\"\n  Author's association with the subject of the comment.\n  \"\"\"\n  authorAssociation: CommentAuthorAssociation!\n\n  \"\"\"\n  The body as Markdown.\n  \"\"\"\n  body: String!\n\n  \"\"\"\n  The body rendered to HTML.\n  \"\"\"\n  bodyHTML: HTML!\n\n  \"\"\"\n  The body rendered to text.\n  \"\"\"\n  bodyText: String!\n\n  \"\"\"\n  Identifies the date and time when the object was created.\n  \"\"\"\n  createdAt: DateTime!\n\n  \"\"\"\n  Check if this comment was created via an email reply.\n  \"\"\"\n  createdViaEmail: Boolean!\n\n  \"\"\"\n  Identifies the primary key from the database.\n  \"\"\"\n  databaseId: Int\n\n  \"\"\"\n  The time when this replied-to comment was deleted\n  \"\"\"\n  deletedAt: DateTime\n\n  \"\"\"\n  The discussion this comment was created in\n  \"\"\"\n  discussion: Discussion\n\n  \"\"\"\n  The actor who edited the comment.\n  \"\"\"\n  editor: Actor\n  id: ID!\n\n  \"\"\"\n  Check if this comment was edited and includes an edit with the creation data\n  \"\"\"\n  includesCreatedEdit: Boolean!\n\n  \"\"\"\n  Has this comment been chosen as the answer of its discussion?\n  \"\"\"\n  isAnswer: Boolean!\n\n  \"\"\"\n  Returns whether or not a comment has been minimized.\n  \"\"\"\n  isMinimized: Boolean!\n\n  \"\"\"\n  The moment the editor made the last edit\n  \"\"\"\n  lastEditedAt: DateTime\n\n  \"\"\"\n  Returns why the comment was minimized.\n  \"\"\"\n  minimizedReason: String\n\n  \"\"\"\n  Identifies when the comment was published at.\n  \"\"\"\n  publishedAt: DateTime\n\n  \"\"\"\n  A list of reactions grouped by content left on the subject.\n  \"\"\"\n  reactionGroups: [ReactionGroup!]\n\n  \"\"\"\n  A list of Reactions left on the Issue.\n  \"\"\"\n  reactions(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Allows filtering Reactions by emoji.\n    \"\"\"\n    content: ReactionContent\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n\n    \"\"\"\n    Allows specifying the order in which reactions are returned.\n    \"\"\"\n    orderBy: ReactionOrder\n  ): ReactionConnection!\n\n  \"\"\"\n  The threaded replies to this comment.\n  \"\"\"\n  replies(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n  ): DiscussionCommentConnection!\n\n  \"\"\"\n  The discussion comment this comment is a reply to\n  \"\"\"\n  replyTo: DiscussionComment\n\n  \"\"\"\n  The path for this discussion comment.\n  \"\"\"\n  resourcePath: URI!\n\n  \"\"\"\n  Identifies the date and time when the object was last updated.\n  \"\"\"\n  updatedAt: DateTime!\n\n  \"\"\"\n  The URL for this discussion comment.\n  \"\"\"\n  url: URI!\n\n  \"\"\"\n  A list of edits to this content.\n  \"\"\"\n  userContentEdits(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n  ): UserContentEditConnection\n\n  \"\"\"\n  Check if the current viewer can delete this object.\n  \"\"\"\n  viewerCanDelete: Boolean!\n\n  \"\"\"\n  Can the current user mark this comment as an answer?\n  \"\"\"\n  viewerCanMarkAsAnswer: Boolean!\n\n  \"\"\"\n  Check if the current viewer can minimize this object.\n  \"\"\"\n  viewerCanMinimize: Boolean!\n\n  \"\"\"\n  Can user react to this subject\n  \"\"\"\n  viewerCanReact: Boolean!\n\n  \"\"\"\n  Can the current user unmark this comment as an answer?\n  \"\"\"\n  viewerCanUnmarkAsAnswer: Boolean!\n\n  \"\"\"\n  Check if the current viewer can update this object.\n  \"\"\"\n  viewerCanUpdate: Boolean!\n\n  \"\"\"\n  Reasons why the current viewer can not update this comment.\n  \"\"\"\n  viewerCannotUpdateReasons: [CommentCannotUpdateReason!]!\n\n  \"\"\"\n  Did the viewer author this comment.\n  \"\"\"\n  viewerDidAuthor: Boolean!\n}\n```\n\n</details>\n\n### 토론카테고리\n\n<details>\n<summary>필드</summary>\n\n```graphql\n\"\"\"\nA category for discussions in a repository.\n\"\"\"\ntype DiscussionCategory implements Node & RepositoryNode {\n  \"\"\"\n  Identifies the date and time when the object was created.\n  \"\"\"\n  createdAt: DateTime!\n\n  \"\"\"\n  A description of this category.\n  \"\"\"\n  description: String\n\n  \"\"\"\n  An emoji representing this category.\n  \"\"\"\n  emoji: String!\n\n  \"\"\"\n  This category's emoji rendered as HTML.\n  \"\"\"\n  emojiHTML: HTML!\n  id: ID!\n\n  \"\"\"\n  Whether or not discussions in this category support choosing an answer with the markDiscussionCommentAsAnswer mutation.\n  \"\"\"\n  isAnswerable: Boolean!\n\n  \"\"\"\n  The name of this category.\n  \"\"\"\n  name: String!\n\n  \"\"\"\n  The repository associated with this node.\n  \"\"\"\n  repository: Repository!\n\n  \"\"\"\n  Identifies the date and time when the object was last updated.\n  \"\"\"\n  updatedAt: DateTime!\n}\n```\n\n</details>\n\n### PinnedDiscussion\n\n<details>\n<summary>필드:</summary>\n\n```graphql\n\"\"\"\nA Pinned discussion is a discussion pinned to a repository's index page.\n\"\"\"\ntype PinnedDiscussion implements Node & RepositoryNode {\n  \"\"\"\n  Identifies the date and time when the object was created.\n  \"\"\"\n  createdAt: DateTime!\n\n  \"\"\"\n  Identifies the primary key from the database.\n  \"\"\"\n  databaseId: Int\n\n  \"\"\"\n  The discussion that was pinned.\n  \"\"\"\n  discussion: Discussion!\n\n  \"\"\"\n  Color stops of the chosen gradient\n  \"\"\"\n  gradientStopColors: [String!]!\n  id: ID!\n\n  \"\"\"\n  Background texture pattern\n  \"\"\"\n  pattern: PinnedDiscussionPattern!\n\n  \"\"\"\n  The actor that pinned this discussion.\n  \"\"\"\n  pinnedBy: Actor!\n\n  \"\"\"\n  Preconfigured background gradient option\n  \"\"\"\n  preconfiguredGradient: PinnedDiscussionGradient\n\n  \"\"\"\n  The repository associated with this node.\n  \"\"\"\n  repository: Repository!\n\n  \"\"\"\n  Identifies the date and time when the object was last updated.\n  \"\"\"\n  updatedAt: DateTime!\n}\n```\n\n</details>\n\n#### 고정된토론패턴\n\n<details>\n<summary>값</summary>\n\n```graphql\n\"\"\"\nPreconfigured background patterns that may be used to style discussions pinned within a repository.\n\"\"\"\nenum PinnedDiscussionPattern {\n  \"\"\"\n  An upward-facing chevron pattern\n  \"\"\"\n  CHEVRON_UP\n\n  \"\"\"\n  A hollow dot pattern\n  \"\"\"\n  DOT\n\n  \"\"\"\n  A solid dot pattern\n  \"\"\"\n  DOT_FILL\n\n  \"\"\"\n  A heart pattern\n  \"\"\"\n  HEART_FILL\n\n  \"\"\"\n  A friendly octocat face pattern\n  \"\"\"\n  OCTOFACE\n\n  \"\"\"\n  A plus sign pattern\n  \"\"\"\n  PLUS\n}\n```\n\n</details>\n\n#### PinnedDiscussionGradient\n\n<details>\n<summary>값</summary>\n\n```graphql\n\"\"\"\nPreconfigured gradients that may be used to style discussions pinned within a repository.\n\"\"\"\nenum PinnedDiscussionGradient {\n  \"\"\"\n  A gradient of blue to mint\n  \"\"\"\n  BLUE_MINT\n\n  \"\"\"\n  A gradient of blue to purple\n  \"\"\"\n  BLUE_PURPLE\n\n  \"\"\"\n  A gradient of pink to blue\n  \"\"\"\n  PINK_BLUE\n\n  \"\"\"\n  A gradient of purple to coral\n  \"\"\"\n  PURPLE_CORAL\n\n  \"\"\"\n  A gradient of red to orange\n  \"\"\"\n  RED_ORANGE\n}\n```\n\n</details>\n\n## 인터페이스\n\n### 저장소토론작성자\n\n`User` 및 `Organization` 형식에 의해 구현됩니다.\n**참고:**`Organization`은 `User`로부터 변환된 경우에만 관련 토론을 갖게 됩니다.\n\n<details>\n<summary>필드</summary>\n\n```graphql\n\"\"\"\nRepresents an author of discussions in repositories.\n\"\"\"\ninterface RepositoryDiscussionAuthor {\n  \"\"\"\n  Discussions this user has started.\n  \"\"\"\n  repositoryDiscussions(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Filter discussions to only those that have been answered or not. Defaults to\n    including both answered and unanswered discussions.\n    \"\"\"\n    answered: Boolean = null\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n\n    \"\"\"\n    Ordering options for discussions returned from the connection.\n    \"\"\"\n    orderBy: DiscussionOrder = {field: CREATED_AT, direction: DESC}\n\n    \"\"\"\n    Filter discussions to only those in a specific repository.\n    \"\"\"\n    repositoryId: ID\n  ): DiscussionConnection!\n}\n```\n\n</details>\n\n### RepositoryDiscussionCommentAuthor (저장소 토론 댓글 작성자)\n\n역시 `User` 및 `Organization` 형식에 의해 구현됩니다.\n\n<details>\n<summary>필드</summary>\n\n```graphql\n\"\"\"\nRepresents an author of discussion comments in repositories.\n\"\"\"\ninterface RepositoryDiscussionCommentAuthor {\n  \"\"\"\n  Discussion comments this user has authored.\n  \"\"\"\n  repositoryDiscussionComments(\n    \"\"\"\n    Returns the elements in the list that come after the specified cursor.\n    \"\"\"\n    after: String\n\n    \"\"\"\n    Returns the elements in the list that come before the specified cursor.\n    \"\"\"\n    before: String\n\n    \"\"\"\n    Returns the first _n_ elements from the list.\n    \"\"\"\n    first: Int\n\n    \"\"\"\n    Returns the last _n_ elements from the list.\n    \"\"\"\n    last: Int\n\n    \"\"\"\n    Filter discussion comments to only those that were marked as the answer\n    \"\"\"\n    onlyAnswers: Boolean = false\n\n    \"\"\"\n    Filter discussion comments to only those in a specific repository.\n    \"\"\"\n    repositoryId: ID\n  ): DiscussionCommentConnection!\n}\n```\n\n</details>\n\n## 변형\n\n이러한 변형은 GraphQL API의 다른 변형과 동일한 구현 패턴을 따릅니다. 각 변형은 변형의 이름을 따서 명명된 `Input` 형식의 단일 인수를 받아들이고, 지정된 필드가 포함된 `Payload` 형식을 반환합니다.\n\n예를 들어, 다음은 새 토론을 만드는 기본 `createDiscussion` 변형입니다.\n\n```graphql\nmutation {\n  # input type: CreateDiscussionInput\n  createDiscussion(input: {repositoryId: \"1234\", categoryId: \"5678\", body: \"The body\", title: \"The title\"}) {\n\n    # response type: CreateDiscussionPayload\n    discussion {\n      id\n    }\n  }\n}\n```\n\n### 토론생성\n\n입력 필드:\n\n* `body: String!` 새 토론의 본문입니다.\n* `title: String!` 새 토론의 제목입니다.\n* `repositoryId: ID!` 토론을 만들 리포지토리의 ID입니다.\n* `categoryId: ID!` 이 리포지토리 내에 있는 `DiscussionCategory`의 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `discussion: Discussion` 생성된 토론입니다.\n\n### 토론업데이트\n\n입력 필드:\n\n* `discussionId: ID!` 업데이트할 토론의 노드 ID입니다.\n* `body: String` 토론 본문의 새 내용입니다.\n* `title: String` 새 토론 제목입니다.\n* `categoryId: ID` 이 토론을 변경할 동일한 리포지토리 내에 있는 `DiscussionCategory`의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `discussion: Discussion` 수정된 토론입니다.\n\n### 토론삭제\n\n입력 필드:\n\n* `id: ID!` 삭제할 토론의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `discussion: Discussion` 삭제된 토론입니다.\n\n### 토론댓글추가\n\n입력 필드:\n\n* `body: String!` 주석의 내용입니다.\n* `discussionId: ID!` 주석을 달 토론의 노드 ID입니다.\n* `replyToId: ID` 회신할 토론 주석의 노드 ID입니다. 없는 경우, 만들어진 주석은 최상위 주석이 됩니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `comment: DiscussionComment` 만들어진 토론 주석입니다.\n\n### 토론댓글업데이트\n\n입력 필드:\n\n* `body: String!` 주석 본문의 새 내용입니다.\n* `commentId: ID!` 업데이트할 토론 주석의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `comment: DiscussionComment` 업데이트된 토론 주석입니다.\n\n### 토론댓글삭제\n\n입력 필드:\n\n* `id: ID!` 삭제할 토론 주석의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `comment: DiscussionComment` 삭제된 토론 주석입니다.\n\n### 토론 댓글을 답변으로 표시\n\n입력 필드:\n\n* `id: ID!` 답변으로 표시할 토론 주석의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `discussion: Discussion` 선택한 주석이 포함된 토론입니다.\n\n### 토론 댓글 답변 표시 해제\n\n입력 필드:\n\n* `id: ID!` 답변으로 표시를 해제할 토론 주석의 노드 ID입니다.\n* `clientMutationId: String` 변형을 수행하는 클라이언트에 대한 고유 식별자입니다.\n\n반환 형식 필드:\n\n* `clientMutationId: String` 입력으로서 제공되는 고유 식별자입니다.\n* `discussion: Discussion` 표시되지 않은 주석이 포함된 토론입니다.\n\n## 검색\n\n토론은 최상위 `search` 필드에서 반환될 수 있습니다. 토론을 검색하려면 `type`을 `DISCUSSION`으로 지정합니다.\n`SearchResultItemConnection` 형식에는 반환된 토론 수를 보고하는 `discussionCount` 필드가 있으며 `Discussion` 형식은 `SearchResultItem` 공용 구조체에 추가됩니다. 자세한 내용은 [검색](/ko/graphql/reference/search#query-searchresultitemconnection) 및 [토론 검색](/ko/search-github/searching-on-github/searching-discussions)을(를) 참조하세요."}