API Reference

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

graphql
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 Instant

Operations

mutation

deleteClipboardItems

Delete matching clipboard-history records; use an explicit all:true query to delete all records.

graphql
# 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 }
}
mutation

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.

graphql
# 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)
}
query

clipboardItemCount

Count clipboard-history entries matching the query.

graphql
query clipboardItemCount($query: String!) {
  clipboardItemCount(query: $query)
}
query

clipboardItems

Read matching clipboard-history entries with pagination, newest first.

graphql
# 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 }
}
subscription

clipboardChanged

Receive clipboard change information.

graphql
subscription clipboardChanged {
  clipboardChanged { text sensitive time }
}