Clipboard
Check app.capabilities for feature support and app.access plus host permissions for authorization. Examples use synthetic values; replace paths, IDs, inputs and filters before calling.
Type Definitions
type Mutation {
deleteClipboardItems(query: String!): ActionResult!
setClipboard(text: String!, label: String! = "", sensitive: Boolean! = false): Boolean!
}
type Query {
clipboardItemCount(query: String!): Int!
clipboardItems(query: String!, offset: Int!, limit: Int!): [ClipboardItem!]!
}
type Subscription {
clipboardChanged: ClipboardChange!
}
type ActionResult {
affectedCount: Int!
}
type ClipboardChange {
text: String!
sensitive: Boolean!
time: Instant!
}
type ClipboardItem {
id: ID!
text: String!
source: String!
label: String!
sensitive: Boolean!
createdAt: Instant!
}
scalar InstantOperations
deleteClipboardItems
Delete matching clipboard-history records; use an explicit all:true query to delete all records.
# Delete clipboard history entries matching the query DSL (`ids:` /
# `text:`; a bare word is a text LIKE). A blank query is rejected —
# send `all:true` to target everything.
mutation deleteClipboardItems($query: String!) {
deleteClipboardItems(query: $query) { affectedCount }
}setClipboard
Write text to the device clipboard. Record history only after the system confirms success; false or a system error leaves history unchanged. A history-storage error is reported after the system write.
# Record caller-attributed history only after a successful system write; suppress watcher echoes.
mutation setClipboard($text: String!, $label: String!, $sensitive: Boolean!) {
setClipboard(text: $text, label: $label, sensitive: $sensitive)
}clipboardItemCount
Count clipboard-history entries matching the query.
query clipboardItemCount($query: String!) {
clipboardItemCount(query: $query)
}clipboardItems
Read matching clipboard-history entries with pagination, newest first.
# Paged clipboard history, newest first.
query clipboardItems($query: String!, $offset: Int!, $limit: Int!) {
clipboardItems(query: $query, offset: $offset, limit: $limit) { id text source label sensitive createdAt }
}clipboardChanged
Receive clipboard change information.
subscription clipboardChanged {
clipboardChanged { text sensitive time }
}