Notes
Ghi chú Markdown được lưu trữ cục bộ trên thiết bị. Hỗ trợ gắn thẻ, thùng rác/khôi phục và xuất.
Định nghĩa kiểu
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
}Thao tác
notes
Tìm kiếm ghi chú (tiêu đề + nội dung). Để query trống để liệt kê tất cả ghi chú không trong thùng rác.
query GetNotes($offset: Int!, $limit: Int!, $query: String!) {
notes(offset: $offset, limit: $limit, query: $query) {
id title content createdAt updatedAt trashed
tags { id name }
}
}noteCount
Đếm ghi chú khớp với một query.
query GetNoteCount($query: String!) {
noteCount(query: $query)
}note
Lấy một ghi chú duy nhất theo ID.
query GetNote($id: ID!) {
note(id: $id) { id title content createdAt updatedAt trashed tags { id name } }
}saveNote
Tạo hoặc cập nhật ghi chú. Truyền id trống để tạo; truyền id hiện có để cập nhật.
mutation SaveNote($id: ID!, $input: NoteInput!) {
saveNote(id: $id, input: $input) { id title updatedAt }
}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.
mutation SaveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Chuyển ghi chú khớp với một query vào thùng rác.
mutation TrashNotes($query: String!) {
trashNotes(query: $query)
}restoreNotes
Khôi phục ghi chú đã xóa khớp với một query.
mutation RestoreNotes($query: String!) {
restoreNotes(query: $query)
}deleteNotes
Xóa vĩnh viễn ghi chú đã xóa khớp với một query. Chỉ hoạt động trên ghi chú đã trong thùng rác.
mutation DeleteNotes($query: String!) {
deleteNotes(query: $query)
}exportNotes
Tuần tự hóa ghi chú khớp với một query (bao gồm thẻ) dưới dạng chuỗi JSON để sao lưu/chuyển.
mutation ExportNotes($query: String!) {
exportNotes(query: $query)
}