Mutation
mutation DeleteSnippet($input: DeleteSnippetInput!) {
deleteSnippet(input: $input) {
snippet {
id
name
text
markdown
path
isDeleted
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"snippetId": "id"
}
}Response
{
"data": {
"deleteSnippet": {
"snippet": {
"id": "id",
"name": "string",
"text": "string",
"markdown": "string",
"path": "string",
"isDeleted": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
deleteSnippet
Soft-deletes a snippet. Deleted snippets are hidden from the snippet picker but remain fetchable by ID with isDeleted: true, preserving the history of replies that referenced them. Requires the snippet:delete permission.
MUTATION
deleteSnippet(input: DeleteSnippetInput!): DeleteSnippetOutput!Arguments
input
required
Returns
snippet
error
Mutation
mutation DeleteSnippet($input: DeleteSnippetInput!) {
deleteSnippet(input: $input) {
snippet {
id
name
text
markdown
path
isDeleted
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"snippetId": "id"
}
}Response
{
"data": {
"deleteSnippet": {
"snippet": {
"id": "id",
"name": "string",
"text": "string",
"markdown": "string",
"path": "string",
"isDeleted": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

