Etiketler
Etiketler DataType başına kapsamlıdır (görseller, ses, video, dosyalar, kişiler, SMS, aramalar, notlar). Etiketleri ve öğe atamalarını buradan yönetin.
Tip Tanımları
type Tag {
id: ID!
name: String!
count: Int! # total items carrying this tag
}
type TagRelation {
tagId: ID!
key: String! # id of the tagged item
}
# DataType scopes which content type a tag belongs to
enum DataType {
AUDIO VIDEO IMAGE SMS CONTACT NOTE FEED_ENTRY CALL DOC PACKAGE FILE
}
# Identifies a single item by its ID key, used in updateTagRelations
input TagRelationStub {
key: String!
}İşlemler
tags
Verilen veri tipi için tüm etiketleri listeleyin.
query GetTags($type: DataType!) {
tags(type: $type) { id name count }
}tagRelations
Tek bir veri tipi içinde bir öğe anahtarları seti (ör. media ID'leri, note ID'leri) için etiket atamalarını bulun.
query GetTagRelations($type: DataType!, $keys: [String!]!) {
tagRelations(type: $type, keys: $keys) {
tagId
key
}
}createTag
Bir veri tipine kapsamlı yeni bir etiket oluşturun.
mutation CreateTag($type: DataType!, $name: String!) {
createTag(type: $type, name: $name) { id name count }
}updateTag
Mevcut bir etiketi yeniden adlandırın.
mutation UpdateTag($id: ID!, $name: String!) {
updateTag(id: $id, name: $name) { id name }
}deleteTag
Bir etiketi silin ve onu tüm etiketli öğelerden kaldırın.
mutation DeleteTag($id: ID!) {
deleteTag(id: $id)
}addToTags
Bir sorguyla eşleşen tüm öğeleri bir veya daha fazla etikete ekleyin.
mutation AddToTags($type: DataType!, $tagIds: [ID!]!, $query: String!) {
addToTags(type: $type, tagIds: $tagIds, query: $query)
}updateTagRelations
Tek bir öğeye tek bir çağrıda etiket ekleyin ve/veya kaldırın.
mutation UpdateTagRelations($type: DataType!, $item: TagRelationStub!, $addTagIds: [ID!]!, $removeTagIds: [ID!]!) {
updateTagRelations(type: $type, item: $item, addTagIds: $addTagIds, removeTagIds: $removeTagIds)
}removeFromTags
Bir sorguyla eşleşen tüm öğeleri bir veya daha fazla etiketten kaldırın.
mutation RemoveFromTags($type: DataType!, $tagIds: [ID!]!, $query: String!) {
removeFromTags(type: $type, tagIds: $tagIds, query: $query)
}