Mutation
mutation CreateConversionPreset($input: CreateConversionPresetInput!) {
createConversionPreset(input: $input) {
conversionPreset {
createdAt
displayName
id
parameters {
aspectRatio
background
mode
outputFormat
paddingPercent
quality
}
presetId
updatedAt
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"displayName": "string",
"id": "string",
"parameters": {
"aspectRatio": "string",
"mode": "FIT",
"outputFormat": "JPG",
"quality": 1,
"targetSize": 1
}
}
}Response
{
"data": {
"createConversionPreset": {
"conversionPreset": {
"createdAt": "value",
"displayName": "string",
"id": "id",
"parameters": {
"aspectRatio": "string",
"background": "string",
"mode": "FIT",
"outputFormat": "JPG",
"paddingPercent": 1,
"quality": 1
},
"presetId": "string",
"updatedAt": "value"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Mutations
createConversionPreset
Creates a conversion preset at version 1 and returns it. The id of a deleted preset creates that preset again, at the version after its last one. Expected failures come back in the payload’s errors list, not as top-level GraphQL errors, each with a code naming the failure: ConflictError when a preset with the id exists, and ValidationError for an invalid id, display name or parameters. A malformed aspectRatio or background fails the whole request instead (see ConversionParametersInput).
MUTATION
createConversionPreset(input: CreateConversionPresetInput!): CreateConversionPresetPayload!Arguments
input
required
Returns
conversionPreset
errors
Mutation
mutation CreateConversionPreset($input: CreateConversionPresetInput!) {
createConversionPreset(input: $input) {
conversionPreset {
createdAt
displayName
id
parameters {
aspectRatio
background
mode
outputFormat
paddingPercent
quality
}
presetId
updatedAt
}
errors {
__typename
... on GraphQlError {
code
details {
__typename
}
message
}
}
}
}Variables
{
"input": {
"displayName": "string",
"id": "string",
"parameters": {
"aspectRatio": "string",
"mode": "FIT",
"outputFormat": "JPG",
"quality": 1,
"targetSize": 1
}
}
}Response
{
"data": {
"createConversionPreset": {
"conversionPreset": {
"createdAt": "value",
"displayName": "string",
"id": "id",
"parameters": {
"aspectRatio": "string",
"background": "string",
"mode": "FIT",
"outputFormat": "JPG",
"paddingPercent": 1,
"quality": 1
},
"presetId": "string",
"updatedAt": "value"
},
"errors": [
{
"__typename": "GraphQlError",
"code": "string",
"details": [
{
"__typename": "KeyValuePairOfStringAndString"
}
],
"message": "string"
}
]
}
}
}Was this page helpful?