पसंदीदा
सुविधा समर्थन के लिए app.capabilities और प्राधिकरण के लिए app.access तथा होस्ट अनुमतियाँ जाँचें। उदाहरण कृत्रिम मान उपयोग करते हैं; कॉल करने से पहले पथ, ID, इनपुट और फ़िल्टर बदलें।
प्रकार परिभाषाएँ
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
}ऑपरेशन
addFavoriteFolder
जल्दी पहुँचने के लिए फ़ोल्डर बुकमार्क करें। सभी बुकमार्क फ़ोल्डर की अपडेट की गई सूची लौटाता है।
# Register a favorite folder and return the whole list.
mutation addFavoriteFolder($rootPath: String!, $fullPath: String!) {
addFavoriteFolder(rootPath: $rootPath, fullPath: $fullPath) { rootPath fullPath alias }
}removeFavoriteFolder
बुकमार्क फ़ोल्डर हटाएँ। बाकी फ़ोल्डर की अपडेट की गई सूची लौटाता है।
# Remove the favorite folder identified by `fullPath` and return the
# whole list.
mutation removeFavoriteFolder($fullPath: String!) {
removeFavoriteFolder(fullPath: $fullPath) { rootPath fullPath alias }
}setFavoriteFolderAlias
बुकमार्क फ़ोल्डर का दिखाया उपनाम सेट या अपडेट करें। उपनाम हटाने के लिए खाली स्ट्रिंग दें।
# 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 }
}favoriteFolders
सहेजे पसंदीदा फ़ोल्डर और उनके उपनाम सूचीबद्ध करें।
# List all favorite folders.
query favoriteFolders {
favoriteFolders { rootPath fullPath alias }
}