itemUpdate Mutation
Description
Updates an existing item's descriptions and type-specific data. Only the provided fields will be updated.
mutation itemUpdate(
$itemRef: ID!
$descriptions: ItemInputDescriptions
$itemUpdateBookInput: ItemBookInput
$itemUpdateReleaseInput: ItemReleaseInput
$itemUpdateProductInput: ItemProductInput
) {
itemUpdate(
itemRef: $itemRef
descriptions: $descriptions
itemUpdateBookInput: $itemUpdateBookInput
itemUpdateReleaseInput: $itemUpdateReleaseInput
itemUpdateProductInput: $itemUpdateProductInput
) {
_id
id
type
incId
uniqueId
oldId
created
modified
seo {
index
description
slug
title
}
isForbiddenForSale
logs {
action
description
date
ip
}
handle
path
uri
wants
bitly
descriptions {
main
}
listings {
_id
id
status
comments
privateComments
location
discogsId
taxDefinition
preventDiscogsListing
readOnly
onePerCustomer
supplierCode
sku
barcode
posted
available
preOrder
categories
archived
secondHand
}
data {
id
assetLink
thumb
title
discogsId
country
releaseDate
weight
genres
year
styles
manufacturer
cat
type
subtitle
authors
publisher
publishedDate
pageCount
categories
maturityRating
language
search
format
}
}
}
Variables
{
"itemRef": "a9aa165760b3a583750d4b82",
"descriptions": {
"short": "short",
"long": "long"
},
"itemUpdateBookInput": {
"title": "title",
"subtitle": "subtitle",
"authors": [
"authors"
],
"publisher": "publisher",
"categories": [
"categories"
],
"pageCount": 42,
"language": "language",
"publishedDate": 1761231405513,
"weight": 230,
"format": "format",
"assetLink": "assetLink",
"images": [
{
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"width": 30.7,
"height": 30.7,
"alternative": null
}
],
"identifiers": [
{
"type": "type",
"description": "A description",
"value": "value"
}
]
},
"itemUpdateReleaseInput": {
"discogsId": 987654321,
"title": "title",
"identifiers": [
{
"type": "type",
"description": "A description",
"value": "value"
}
],
"country": "Canada",
"formats": [
{
"qty": "qty",
"name": "A name",
"descriptions": [
"A description"
],
"text": "text"
}
],
"tracklist": [
{
"artists": [
{
"id": 9758280793894,
"anv": "anv",
"name": "A name",
"role": "role"
}
],
"type_": "type_",
"title": "title",
"position": "position",
"duration": "duration"
}
],
"releaseDate": 1741202529145,
"weight": 230,
"genres": [
"genres"
],
"styles": [
"styles"
],
"images": [
{
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"width": 30.7,
"height": 30.7,
"alternative": null
}
],
"artists": [
{
"id": 9052840539249,
"role": "role",
"anv": "anv",
"name": "A name",
"join": "join"
}
],
"year": 42,
"assetLink": "assetLink",
"labels": [
{
"id": 2465880520720,
"catno": "catno",
"name": "A name"
}
],
"videos": [
{
"duration": 42,
"title": "title",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name"
}
]
},
"itemUpdateProductInput": {
"title": "title",
"images": [
{
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"width": 30.7,
"height": 30.7,
"alternative": null
}
],
"identifiers": [
{
"type": "type",
"description": "A description",
"value": "value"
}
],
"manufacturer": "manufacturer",
"cat": "cat",
"type": "type",
"weight": 230,
"assetLink": "assetLink",
"giftCard": {
"active": true,
"codeLength": 42,
"prefix": "prefix",
"singleSpending": true
}
}
}
Response
{
"itemUpdate": {
"_id": "c573c81bc6275f0dc62357cf",
"id": 1.23,
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1712437620530,
"modified": 1734697765492,
"seo": {
"index": true,
"description": "example",
"slug": "example",
"title": "example"
},
"isForbiddenForSale": true,
"logs": [
{
"action": "example",
"description": "example",
"date": 1730472725425,
"ip": "example"
}
],
"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",
"descriptions": {
"main": "example"
},
"listings": [
{
"_id": "49a73ef84c1f9ee3fd5326e9",
"id": 1.23,
"status": "example",
"comments": "example",
"privateComments": "example",
"location": "example",
"discogsId": 987654321,
"taxDefinition": "example",
"preventDiscogsListing": true,
"readOnly": true,
"onePerCustomer": true,
"supplierCode": "example",
"sku": "example",
"barcode": "example",
"posted": 1707697212163,
"available": 1736276070218,
"preOrder": true,
"categories": [
"example"
],
"archived": true,
"secondHand": true
}
],
"data": {
"id": 1.23,
"assetLink": "example",
"thumb": "example",
"title": "example",
"discogsId": 987654321,
"country": "example",
"releaseDate": 1713744928629,
"weight": 1.23,
"genres": [
"example"
],
"year": 42,
"styles": [
"example"
],
"manufacturer": "example",
"cat": "example",
"type": "example",
"subtitle": "example",
"authors": [
"example"
],
"publisher": "example",
"publishedDate": 1747674207952,
"pageCount": 42,
"categories": [
"example"
],
"maturityRating": "example",
"language": "example",
"search": "example",
"format": "example"
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
itemRef | ID! | Reference ID of the item to update. |
descriptions | ItemInputDescriptions | Updated short and long descriptions for the item. |
itemUpdateBookInput | ItemBookInput | Updated book-specific data. Only applicable for BookItem type. |
itemUpdateReleaseInput | ItemReleaseInput | Updated release-specific data. Only applicable for ReleaseItem type. |
itemUpdateProductInput | ItemProductInput | Updated product-specific data. Only applicable for ProductItem type. |
Returns
Item!