API Reference

Notes

Markdown notes stored locally on the device. Supports tagging, trash/restore, and export.

Type Definitions

bash
type Note {
  id: ID!
  title: String!
  content: String!            # Markdown body
  createdAt: String!          # ISO 8601
  updatedAt: String!
  trashed: Boolean!           # true when in trash
  tags: [Tag!]!
}

input NoteInput {
  title: String
  content: String
}

Operations

query

notes

Search notes (title + content). Leave query empty to list all non-trashed notes.

bash
query GetNotes($offset: Int!, $limit: Int!, $query: String!) {
  notes(offset: $offset, limit: $limit, query: $query) {
    id title content createdAt updatedAt trashed
    tags { id name }
  }
}
query

noteCount

Count notes matching a query.

bash
query GetNoteCount($query: String!) {
  noteCount(query: $query)
}
query

note

Fetch a single note by ID.

bash
query GetNote($id: ID!) {
  note(id: $id) { id title content createdAt updatedAt trashed tags { id name } }
}
mutation

saveNote

Create or update a note. Pass an empty id to create; pass an existing id to update.

bash
mutation SaveNote($id: ID!, $input: NoteInput!) {
  saveNote(id: $id, input: $input) { id title updatedAt }
}
mutation

saveFeedEntriesToNotes

Bulk-save feed entries matching a query as notes (title = feed entry title, content = "# <title>\n\n<body>"). Returns the saved feed entry IDs.

bash
mutation SaveFeedEntriesToNotes($query: String!) {
  saveFeedEntriesToNotes(query: $query)
}
mutation

trashNotes

Move notes matching a query to the trash.

bash
mutation TrashNotes($query: String!) {
  trashNotes(query: $query)
}
mutation

restoreNotes

Restore trashed notes matching a query.

bash
mutation RestoreNotes($query: String!) {
  restoreNotes(query: $query)
}
mutation

deleteNotes

Permanently delete trashed notes matching a query. Only operates on already-trashed notes.

bash
mutation DeleteNotes($query: String!) {
  deleteNotes(query: $query)
}
mutation

exportNotes

Serialize notes matching a query (including tags) as a JSON string for backup/transfer.

bash
mutation ExportNotes($query: String!) {
  exportNotes(query: $query)
}