createMirror

Create a mirror of a Post

🔑 Requires authentication

This operation requires Bearer Token issued from our Authentication flow appended to the request headers. Please refer to Authentication page.

Interface

GraphQL Schema
input MirrorCreateInput {
  profileId: String!
  publicationId: String!
  content: String
  contentS3Uri: String!
  contentUri: String!
  primaryContentType: PublicationContentType!
  locale: String
}

type Mutation {
  createMirror(input: MirrorCreateInput!): Mirror!
}

Request Input

MirrorCreateInput object

  • profileId: [Required]

  • publicationsId: [Required] The postId of Post to be mirrored

  • content: [Optional] Text content of comment, must be provided if no media attached

  • contentS3Uri: [Required] Centralised storage URI of mirror's content metadata

  • contentUri: [Required] Decentralised storage URI of mirror's content metadata

  • primaryContentType: [Required] Refer to Publication Content Metadata

  • locale: [Optional] ISO-639-1 representation of locale information

  • appId: [Optional] Client executing Comment creation

Operation

GraphQL Operation
mutation CreateMirror {
  createMirror(
    input: {
      profileId: "0x24",
      publicationId: "0x1a-0x1"
      content: "I love Sakura!!",
      contentS3Uri: "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ca7e400c-e83c-4ad3-85e4-ed3f0b0676b9.json",
      contentUri: "ar://eXcwlbsV1BiRGCsGKXa60Mj0i-xDZU0k95l_ysNwv_w/9276979d-53fe-4ce7-89a5-ab0d3292b489.json",
      locale: "US",
      primaryContentType: TEXT_ONLY
    }
  ) {
    id
    mirrorId
    profileId
    content
    contentS3Uri
    locale
    # ... any other Mirror fields
  }
}

Response

JSON Response
{
  "data": {
    "createMirror": {
      "id": "23",
      "mirrorId": null,
      "profileId": "0x24",
      "content": "I love Sakura!!",
      "contentS3Uri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ca7e400c-e83c-4ad3-85e4-ed3f0b0676b9.json",
      "locale": "US"
      // ... any other Mirror fields
    }
  }
}

Last updated