diff --git a/packages/docs/src/.vuepress/config.js b/packages/docs/src/.vuepress/config.js index 7f8028c..ba15507 100644 --- a/packages/docs/src/.vuepress/config.js +++ b/packages/docs/src/.vuepress/config.js @@ -186,6 +186,7 @@ module.exports = { 'use-mutation', 'use-subscription', 'use-result', + 'use-loading', 'use-apollo-client', ], }, diff --git a/packages/docs/src/api/use-loading.md b/packages/docs/src/api/use-loading.md new file mode 100644 index 0000000..6f0a366 --- /dev/null +++ b/packages/docs/src/api/use-loading.md @@ -0,0 +1,78 @@ +# Loading utilities + +## useQueryLoading + +Returns a boolean `Ref` which is `true` if at least one of the queries used by the component is loading. + +Example: + +```vue + + + +``` + +## useMutationLoading + +Returns a boolean `Ref` which is `true` if at least one of the mutations used by the component is loading. + +## useSubscriptionLoading + +Returns a boolean `Ref` which is `true` if at least one of the subscriptions used by the component is loading. + +## useGlobalQueryLoading + +Returns a boolean `Ref` which is `true` if at least one of the queries in the entire application is loading. + +Example: + +```vue + + + +``` + +## useGlobalMutationLoading + +Returns a boolean `Ref` which is `true` if at least one of the mutations in the entire application is loading. + +## useGlobalSubscriptionLoading + +Returns a boolean `Ref` which is `true` if at least one of the subscriptions in the entire application is loading.