Note
Verificare app.capabilities per il supporto delle funzionalità e app.access insieme alle autorizzazioni host per l’autorizzazione. Gli esempi usano valori sintetici; sostituire percorsi, ID, input e filtri prima della chiamata.
Definizioni di tipo
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!
}Operazioni
createNote
Creare e salvare una nota dai dati forniti.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Eliminare definitivamente le note nel cestino corrispondenti a una query. Agisce solo su note già nel cestino.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}restoreNotes
Ripristinare le note nel cestino corrispondenti a una query.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Salvare come note gli articoli dei feed corrispondenti e restituire gli ID delle note create.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Spostare nel cestino le note corrispondenti a una query.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Aggiornare una nota memorizzata dai dati forniti.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}exportNotes
Serializzare le note corrispondenti a una query (tag inclusi) come stringa JSON per backup o trasferimento.
query exportNotes($query: String!) {
exportNotes(query: $query)
}note
Recuperare una nota tramite ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Contare le note corrispondenti a una query.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Cercare note (titolo + contenuto). Lasciare query vuoto per elencare tutte le note fuori dal cestino.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}