Notizen
Funktionsunterstützung über app.capabilities prüfen, Autorisierung über app.access und Host-Berechtigungen. Die Beispiele verwenden synthetische Werte; vor dem Aufruf Pfade, IDs, Eingaben und Filter ersetzen.
Typdefinitionen
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!
}Operationen
createNote
Erstellt und speichert eine Notiz aus den übergebenen Eingaben.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Löscht Notizen im Papierkorb, die einer Abfrage entsprechen, endgültig. Verarbeitet ausschließlich bereits gelöschte Notizen im Papierkorb.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}restoreNotes
Stellt passende Notizen aus dem Papierkorb wieder her.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Speichert passende Feedartikel als Notizen und gibt deren neue IDs zurück.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Verschiebt Notizen, die einer Abfrage entsprechen, in den Papierkorb.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Aktualisiert eine gespeicherte Notiz aus den übergebenen Eingaben.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}exportNotes
Serialisiert passende Notizen einschließlich ihrer Tags als JSON-Zeichenfolge für Sicherung oder Übertragung.
query exportNotes($query: String!) {
exportNotes(query: $query)
}note
Lädt eine einzelne Notiz anhand ihrer ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Zählt Notizen, die einer Abfrage entsprechen.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Durchsucht Titel und Inhalt von Notizen. Eine leere query listet alle Notizen außerhalb des Papierkorbs auf.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}