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)
}