Maton
Guide

Annotating nodes

Add tags and metadata to any node to record your own state, such as "needs reply" or a due date. They stay on the node across requests and can be used in filters. You can only annotate nodes that have been observed. Mutations return null for unknown IDs.

Tags

A tag is a name such as urgent or billing/overdue. Use / to group tags.

mutation {
  tag(ids: ["google-mail/users/{userId}/threads/{threadId}"], tags: ["needs-reply"]) {
    id
    tags
  }
}
MutationDescription
tag(ids, tags)Adds tags. Idempotent.
untag(ids, tags)Removes tags. Idempotent.
setTags(id, tags)Replaces all tags on one node. An empty list removes every tag.

List tag names in use with the tags query, optionally by prefix:

{ tags(prefix: "billing/") }

Find tagged nodes:

{
  search(filter: { tags: { some: { eq: "needs-reply" } } }) {
    nodes { __typename id }
  }
}

Metadata

Metadata is a set of key-value pairs. Values are strings, numbers, booleans, or arrays of those.

mutation {
  setMetadata(
    ids: ["google-mail/users/{userId}/threads/{threadId}"]
    metadata: [
      { key: "dueDate", value: "2026-12-01T18:00:00Z" }
      { key: "priority", value: 2 }
    ]
  ) {
    id
    metadata
  }
}
MutationDescription
setMetadata(ids, metadata)Merges keys. Keys not given are kept. A null value removes the key.
unsetMetadata(ids, keys)Removes keys.

Filter by type: string, number, boolean, date (ISO 8601 string values), or null for missing keys.

{
  search(filter: { metadata: { some: { key: "dueDate", date: { lt: "P1D" } } } }) {
    nodes { id metadata }
  }
}

Limits

LimitValue
IDs per mutation100
Tags per node50
Tag name128 characters, segments of [A-Za-z0-9._-] separated by /
Metadata keys per node50
Metadata key64 characters, same character rules as tags
Metadata value4 KB as JSON, 2 KB for a string

Next

On this page