Skip to content

returnAttachmentUpload

Mutationin Return

A signed URL to upload one attachment to

Arguments

ArgumentTypeDescription
filenameString!
contentTypeString!

Returns

ReturnAttachmentUploadResponse!

FieldTypeDescription
uploadReturnAttachmentUpload
returnErrors[ReturnAttachmentUploadError!]Such as a content type or size the server refuses

Example

mutation ReturnAttachmentUpload($filename: String!, $contentType: String!) {
returnAttachmentUpload(filename: $filename, contentType: $contentType) {
upload {
attachmentId
uploadUrl
expiresAt
}
returnErrors {
__typename
... on ValidationError {
message
}
... on ReturnError {
message
code
}
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved

Used by

The storefront packages that send it, in these GraphQL documents: