Tag
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 {
addToTags(type: DataType!, tagIds: [ID!]!, query: String!): Boolean!
createTag(type: DataType!, name: String!): Tag!
deleteTag(id: ID!): Boolean!
removeFromTags(type: DataType!, tagIds: [ID!]!, query: String!): Boolean!
updateTag(id: ID!, name: String!): Tag!
updateTagRelations(type: DataType!, keys: [String!]!, addTagIds: [ID!]!, removeTagIds: [ID!]!): Boolean!
}
type Query {
tagKeys(id: ID!): [String!]!
tagRelations(type: DataType!, keys: [String!]!): [TagRelation!]!
tags(type: DataType!): [Tag!]!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}
type TagRelation {
tagId: ID!
key: String!
}Operazioni
createTag
Creare un nuovo tag per un tipo di dati.
mutation createTag($type: DataType!, $name: String!) {
createTag(type: $type, name: $name) { id name type count }
}deleteTag
Eliminare un tag e rimuoverlo da tutti gli elementi contrassegnati.
mutation deleteTag($id: ID!) {
deleteTag(id: $id)
}updateTag
Rinominare un tag esistente.
mutation updateTag($id: ID!, $name: String!) {
updateTag(id: $id, name: $name) { id name type count }
}updateTagRelations
Aggiungere e/o rimuovere tag da un singolo elemento in una chiamata.
mutation updateTagRelations($type: DataType!, $keys: [String!]!, $addTagIds: [ID!]!, $removeTagIds: [ID!]!) {
updateTagRelations(type: $type, keys: $keys, addTagIds: $addTagIds, removeTagIds: $removeTagIds)
}tagKeys
Elencare le chiavi degli elementi associati al tag specificato.
query tagKeys($id: ID!) {
tagKeys(id: $id)
}tagRelations
Cercare le assegnazioni dei tag per un insieme di chiavi di elementi (ad es. ID multimediali o di note) in un tipo di dati.
query tagRelations($type: DataType!, $keys: [String!]!) {
tagRelations(type: $type, keys: $keys) { tagId key }
}