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": "1eef8503fe92e0972aae08f3",
"seoInput": {
"title": "title",
"description": "A description",
"index": true,
"slug": "slug"
}
}

Response

{
"collectionSeoUpdate": {
"_id": "c6cc69c6aecb01d31c30ac61",
"created": 1721633682969,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "8d460ea809033f8bacb458fd"
},
"id": 2503161917351,
"title": "example",
"description": {
"content": "example"
},
"handle": "example",
"sort": {
"key": "example",
"order": 42
},
"viewType": "example",
"seo": {
"index": true,
"description": "example",
"slug": "example",
"title": "example"
},
"path": "/release/1763553751/release-artist-release-name",
"banner": {
"format": "example"
},
"segments": [
{
"_id": "bbfb82d180b752e3e4c550f7",
"title": "example"
}
]
}
}

Arguments

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

Returns

Collection!