API リファレンス

Notes

デバイスにローカル保存された Markdown メモ。タグ付け、ゴミ箱/復元、エクスポートをサポートします。

型定義

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
}

操作

query

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

クエリに一致するメモの数をカウントします。

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

note

ID で単一のメモを取得します。

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

saveNote

メモを作成または更新します。空の id を渡すと作成、既存の id を渡すと更新します。

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

クエリに一致するメモをゴミ箱に移動します。

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

restoreNotes

ゴミ箱内のクエリに一致するメモを復元します。

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

deleteNotes

ゴミ箱内のクエリに一致するメモを完全に削除します。既にゴミ箱に入っているメモのみを対象とします。

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

exportNotes

クエリに一致するメモ (タグを含む) をバックアップ/転送用の JSON 文字列としてシリアライズします。

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