Mutations
createVersion
Creates a new version for a target entity such as a component, model, or drawing.
Template for Mutation:
mutation CreateVersion($input: createVersionInput){
createVersion(input: $input) {
# CreateVersionPayload Fields
}
}
Arguments
| input | Input object specifying the target entity and version details. |
Possible Returns
| Value Type | Description |
|---|---|
| CreateVersionPayload | Response payload for the createVersion, createVersionForComponent, and createVersionForItem mutations. |
Examples
Example 1
Create version for given targetId.
Query:
mutation CreateVersion($input: CreateVersionInput){
createVersion(input: $input) {
version{
id
status
}
}
}
Show More
Query Variables:
{
"input" : {
"targetId":"bW9kZWx-OWFiTWNGeEtnaFB5Y3d1TW9hR05pa19MMkN-emExWlNFS1BuVEd4NWlvT24wdWdVQV9hZ2E",
"description": "New version"
}
}
Response:
{
"data": {
"createVersion": {
"version": {
"id": "dmVyc2lvbn45YWJNY0Z4S2doUHljd3VNb2FHTmlrX0wyQ342WDNaTEIyTnY2SmtBcGVhU3FIWE03",
"status": "IN_PROGRESS"
}
}
}
}
Show More