collectionCreate Mutation
Description
Creates a new collection with the specified title and optional reference.
mutation collectionCreate($title: String!, $collectionRef: ID) {
collectionCreate(title: $title, collectionRef: $collectionRef) {
_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
{
"title": "title",
"collectionRef": "2cf4cdfb31ec75e98da9f0f8"
}
Response
{
"collectionCreate": {
"_id": "cfa56b1a79c086a402df73c1",
"created": 1739260820256,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "cfc1bc19fe9cbd21203d57f7"
},
"id": 8149591290013,
"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": "e274ea56cce89d1dd7b0785a",
"title": "example"
}
]
}
}
Arguments
| Name | Type | Description |
|---|---|---|
title | String! | Title of the new collection (required) |
collectionRef | ID | Optional reference ID for the collection |