Skip to main content

itemGenerateLink Mutation

Description

Generates a short link for an item, returning the item and the generated URI.

mutation itemGenerateLink($itemRef: ID!, $type: String) {
itemGenerateLink(itemRef: $itemRef, type: $type) {
item {
_id
id
type
incId
uniqueId
oldId
created
modified
isForbiddenForSale
handle
path
uri
wants
bitly
}
uri
}
}

Variables

{
"itemRef": "9212c916f8582aae6eb80053",
"type": "type"
}

Response

{
"itemGenerateLink": {
"item": {
"_id": "95491375c7f4ee04deb253cd",
"id": 1.23,
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1712660085089,
"modified": 1728636034384,
"isForbiddenForSale": true,
"handle": "example",
"path": "/release/1763553751/release-artist-release-name",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"wants": 42,
"bitly": "example"
},
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name"
}
}

Arguments

NameTypeDescription
itemRefID!Reference ID of the item to generate a link for.
typeStringType of link to generate.

Returns

ItemGenerateLinkResult