Skip to main content

collectionSeoUpdate Mutation

Description​

Updates the SEO metadata for a collection.

mutation collectionSeoUpdate($collectionRef: ID!, $seoInput: SeoInput!) {
collectionSeoUpdate(collectionRef: $collectionRef, seoInput: $seoInput) {
_id
created
createdBy {
type
name
email
ref
}
id
title
description {
content
}
handle
sort {
key
order
}
viewType
seo {
index
description
slug
title
}
path
banner {
format
}
segments {
_id
title
}
}
}

Variables​

{
"collectionRef": "e41fdf36fb9f0864eb4ab3fe",
"seoInput": {
"title": "title",
"description": "A description",
"index": true,
"slug": "slug"
}
}

Response​

{
"collectionSeoUpdate": {
"_id": "6487db20e205d26440e46b72",
"created": 1754476924320,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "a85bf4dedf98a47d811958eb"
},
"id": 498340517291,
"title": "example",
"description": {
"content": "example"
},
"handle": "example",
"sort": {
"key": "example",
"order": -1
},
"viewType": "example",
"seo": {
"index": true,
"description": "example",
"slug": "example",
"title": "example"
},
"path": "/release/1763553751/release-artist-release-name",
"banner": {
"format": "example"
},
"segments": [
{
"_id": "9b734e98a1b828f8bc4a0e18",
"title": "example"
}
]
}
}

Arguments​

NameTypeDescription
collectionRefID!Reference ID of the collection to update (required)
seoInputSeoInput!SeoInput object containing metadata (required)

Returns​

Collection!