Mutations
createVersionForComponent
Creates a new version for a component, capturing its current state as a snapshot.
Template for Mutation:
mutation CreateVersionForComponent($input: createVersionForComponentInput){
createVersionForComponent(input: $input) {
# CreateVersionPayload Fields
}
}
Arguments
| input | Input object specifying the component and version details. |
Possible Returns
| Value Type | Description |
|---|---|
| CreateVersionPayload | Response payload for the createVersion, createVersionForComponent, and createVersionForItem mutations. |
Examples
Example 1
Create version for component.
Query:
mutation CreateVersionForComponent($input: CreateVersionForComponentInput){
createVersionForComponent(input: $input) {
version{
id
releaseState
status
}
}
}
Show More
Query Variables:
{
"input" : {
"componentId":"cHJvZHVjdH45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35NeWpwUUR6Q3YwdFZQQzBYMVRhUVdPX2FnYQ",
"description": "New version"
}
}
Response:
{
"data": {
"createVersionForComponent": {
"version": {
"id": "dmVyc2lvbn45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ35PTk1mUWxnQUVYek5MbmxibUZxaU9E",
"releaseState": "UNRELEASED",
"status": "IN_PROGRESS"
}
}
}
}
Show More