acceptOffer

Once a metamask transaction is confirmed, acceptOffer mutation is called to complete the offer approval process to update the transaction hash and transfer the ownership in database level and triggering the respective mails to the user.

Sample mutation

mutation acceptOffer(
  $orderId: UUID1!
  $orgId: UUID1!
  $transactionHash: String!
) {
  acceptOffer(
    orderId: $orderId
    orgId: $orgId
    transactionHash: $transactionHash
  ) {
    success
    newNFTID
    __typename
  }
}

Sample variable

{
  "orderId": "b2d7ad12-9515-470d-b393-22e2d6b5ee0c",
  "orgId": "f2f5c627-5421-4c40-9913-edfd09dd98b3",
  "transactionHash": "0xb54cefb4f32f97d9e38954837c865cb5a2f2a1c2dff7bef6dcf0c4476b212229"
}

Sample response

{
  "data": {
    "acceptOffer": {
      "success": true,
      "newNFTID": "ba7be6d2-0294-4eca-b124-a9c46dbb11bc",
      "__typename": "TransactionResponse"
    }
  }
}

Arguments

NameTypeDescriptionRequired
orderIdUUIDUpdate status as rejected against the order idYes
orgIdUUIDThe organization idYes
transactionHashStringMetamask transaction addressYes

Fields

NameTypeDescription
acceptOfferObjectAn object that contains the accept offer status and new NFT id.

Example