Ghi chú
Kiểm tra app.capabilities để biết tính năng và app.access cùng quyền máy chủ để xác định quyền truy cập. Thay giá trị mẫu trước khi gọi.
Định nghĩa kiểu
type Mutation {
createNote(input: NoteInput!): Note!
deleteNotes(query: String!): ActionResult!
restoreNotes(query: String!): ActionResult!
saveFeedEntriesToNotes(query: String!): [ID!]!
trashNotes(query: String!): ActionResult!
updateNote(id: ID!, input: NoteInput!): Note!
}
type Query {
exportNotes(query: String!): String!
note(id: ID!): Note
noteCount(query: String!): Int!
notes(query: String!, offset: Int!, limit: Int!): [Note!]!
}
type ActionResult {
affectedCount: Int!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
scalar Instant
type Note {
id: ID!
title: String!
content: String!
deletedAt: Instant
createdAt: Instant!
updatedAt: Instant!
tags: [Tag!]!
}
input NoteInput {
title: String!
content: String!
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}Thao tác
createNote
Tạo và lưu bền vững ghi chú từ đầu vào được cung cấp.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Xóa vĩnh viễn ghi chú trong thùng rác khớp truy vấn. Chỉ thao tác trên ghi chú đã ở trong thùng rác.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}restoreNotes
Khôi phục ghi chú trong thùng rác khớp truy vấn.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Lưu các mục nguồn tin khớp thành ghi chú và trả về ID ghi chú đã tạo.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Chuyển ghi chú khớp truy vấn vào thùng rác.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Cập nhật ghi chú đã lưu từ đầu vào được cung cấp.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}exportNotes
Tuần tự hóa ghi chú khớp truy vấn (gồm thẻ) thành chuỗi JSON để sao lưu/chuyển giao.
query exportNotes($query: String!) {
exportNotes(query: $query)
}note
Lấy một ghi chú theo ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Đếm ghi chú khớp truy vấn.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Tìm ghi chú (tiêu đề + nội dung). Để query rỗng để liệt kê mọi ghi chú ngoài thùng rác.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}