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 {
creatorsId
_id
id
type
incId
uniqueId
oldId
created
modified
isForbiddenForSale
handle
path
uri
wants
bitly
}
uri
}
}

Variables​

{
"itemRef": "3b784e4e7997943dd2900e5a",
"type": "type"
}

Response​

{
"itemGenerateLink": {
"item": {
"creatorsId": "example",
"_id": "785ff2bb03ba9e76e7c74b4a",
"id": "example",
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1773480123464,
"modified": 1784559589818,
"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