{"version":3,"sources":["/home/renatorib/p/publissue/packages/api/dist/__chunks/3JWJAUY6.cjs","../../src/publissue/addComment.ts"],"names":["AddCommentMutation","operation","graphql","data","Comment","addComment","props"],"mappings":"AAAA,sHAAkC,6CAAmC,6CAAmC,ICIlGA,CAAAA,CAAqBC,4BAAAA,4BACzBC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA,CAUP,CACH,CAAA,CAAE,OAAA,CAASC,CAAAA,EAAAA,CACF,CACL,OAAA,CAASC,cAAAA,CAAQ,MAAA,CAAOD,CAAAA,CAAK,UAAA,CAAY,WAAA,CAAa,IAAK,CAC7D,CAAA,CACD,CAAA,CAED,MAAA,SAAsBE,CAAAA,CAEpBC,CAAAA,CAIA,CACA,OAAO,IAAA,CAAK,OAAA,CAAQN,CAAkB,CAAA,CAAE,OAAA,CAAQ,CAC9C,KAAA,CAAO,CAAE,IAAA,CAAMM,CAAAA,CAAM,IAAA,CAAM,SAAA,CAAWA,CAAAA,CAAM,MAAO,CACrD,CAAC,CACH,CAAA,cAAA","file":"/home/renatorib/p/publissue/packages/api/dist/__chunks/3JWJAUY6.cjs","sourcesContent":[null,"import { graphql, operation } from \"../lib/graphql\";\nimport { Comment } from \"../types/Comment\";\nimport { Publissue } from \".\";\n\nconst AddCommentMutation = operation(\n  graphql(`\n    mutation AddComment($input: AddCommentInput!) {\n      addComment(input: $input) {\n        commentEdge {\n          node {\n            ...Comment_IssueComment\n          }\n        }\n      }\n    }\n  `),\n).withMap((data) => {\n  return {\n    comment: Comment.unmask(data.addComment!.commentEdge!.node!),\n  };\n});\n\nexport async function addComment(\n  this: Publissue,\n  props: {\n    body: string;\n    postId: string;\n  },\n) {\n  return this.graphql(AddCommentMutation).execute({\n    input: { body: props.body, subjectId: props.postId },\n  });\n}\n"]}