query Snippet($snippetId: ID!) {
snippet(snippetId: $snippetId) {
id
name
text
markdown
path
isDeleted
}
}{
"snippetId": "id"
}{
"data": {
"snippet": {
"id": "id",
"name": "string",
"text": "string",
"markdown": "string",
"path": "string",
"isDeleted": true
}
}
}snippet
Fetches a single snippet by its ID, or null if no snippet with that ID exists. Returns soft-deleted snippets (where isDeleted is true). Requires the snippet:read permission.
snippet(snippetId: ID!): SnippetArguments
Returns
The plain-text body of the snippet, used in channels that do not render markdown.
Optional markdown body. When present, this is preferred over text in rich-text channels.
Folder path used to group snippets in the Plain app. Only alphanumeric characters are allowed. Null means the snippet is ungrouped.
Whether the snippet has been soft-deleted. Soft-deleted snippets are hidden from the snippet picker but remain queryable by ID.
The timestamp at which the snippet was soft-deleted, or null if it has not been deleted.
The user or machine user that deleted the snippet, or null if it has not been deleted.
query Snippet($snippetId: ID!) {
snippet(snippetId: $snippetId) {
id
name
text
markdown
path
isDeleted
}
}{
"snippetId": "id"
}{
"data": {
"snippet": {
"id": "id",
"name": "string",
"text": "string",
"markdown": "string",
"path": "string",
"isDeleted": true
}
}
}Was this page helpful?

