Skip to main content
Mutation

mintUserAvatarUpload

Returns a short-lived upload target for a new avatar for the signed-in user. Upload the image to the target; once it has arrived, the next read of the user shows it as the avatar. No further call is needed.

Arguments

  • contentTypeString!

    MIME type of the image: image/jpeg, image/png or image/webp.

  • sizeBytesBigInt!

    Size of the file in bytes. Uploads are limited to 10 MB.

Returns

Upload!

Example

mutation MintUserAvatarUpload($contentType: String!, $sizeBytes: BigInt!) {
  mintUserAvatarUpload(contentType: $contentType, sizeBytes: $sizeBytes) {
    target {
      expiresAt
      method
      objectKey
      uploadUrl
    }
  }
}