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 }
}