Riferimento API

Preferiti

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

graphql
type Mutation {
  addFavoriteFolder(rootPath: String!, fullPath: String!): [FavoriteFolder!]!
  removeFavoriteFolder(fullPath: String!): [FavoriteFolder!]!
  setFavoriteFolderAlias(fullPath: String!, alias: String!): [FavoriteFolder!]!
}

type Query {
  favoriteFolders: [FavoriteFolder!]!
}

type FavoriteFolder {
	rootPath: String!
	fullPath: String!
	alias: String
}

Operazioni

mutation

addFavoriteFolder

Aggiungere una cartella ai preferiti per l’accesso rapido. Restituisce l’elenco aggiornato di tutte le cartelle preferite.

graphql
# Register a favorite folder and return the whole list.
mutation addFavoriteFolder($rootPath: String!, $fullPath: String!) {
  addFavoriteFolder(rootPath: $rootPath, fullPath: $fullPath) { rootPath fullPath alias }
}
mutation

removeFavoriteFolder

Rimuovere una cartella dai preferiti. Restituisce l’elenco aggiornato delle cartelle rimanenti.

graphql
# Remove the favorite folder identified by `fullPath` and return the
# whole list.
mutation removeFavoriteFolder($fullPath: String!) {
  removeFavoriteFolder(fullPath: $fullPath) { rootPath fullPath alias }
}
mutation

setFavoriteFolderAlias

Impostare o aggiornare l’alias visualizzato di una cartella preferita. Passare una stringa vuota per cancellare l’alias.

graphql
# Set the favorite folder's display alias and return the whole list; error if the favorite does not exist.
mutation setFavoriteFolderAlias($fullPath: String!, $alias: String!) {
  setFavoriteFolderAlias(fullPath: $fullPath, alias: $alias) { rootPath fullPath alias }
}
query

favoriteFolders

Elencare le cartelle preferite salvate e i relativi alias.

graphql
# List all favorite folders.
query favoriteFolders {
  favoriteFolders { rootPath fullPath alias }
}