API リファレンス

お気に入り

機能の対応状況は app.capabilities、認可は app.access とホストの権限で確認してください。例は合成値を使用しています。呼び出す前にパス、ID、入力、フィルターを置き換えてください。

型定義

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
}

操作

mutation

addFavoriteFolder

すぐにアクセスできるようフォルダーをブックマークします。更新後の全ブックマークフォルダー一覧を返します。

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

ブックマーク済みフォルダーを削除します。残りのフォルダーの更新済み一覧を返します。

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

ブックマーク済みフォルダーに表示するエイリアスを設定または更新します。消去するには空文字列を渡します。

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

保存済みのお気に入りフォルダーとエイリアスを一覧表示します。

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