locales.api.ts 1.8 KB

12345678910111213141516171819202122232425
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import * as VueApolloComposable from '@vue/apollo-composable';
  4. import * as VueCompositionApi from 'vue';
  5. export type ReactiveFunction<TParam> = () => TParam;
  6. export const LocalesDocument = gql`
  7. query locales($onlyActive: Boolean = false) {
  8. locales(onlyActive: $onlyActive) {
  9. locale
  10. alias
  11. name
  12. dir
  13. active
  14. }
  15. }
  16. `;
  17. export function useLocalesQuery(variables: Types.LocalesQueryVariables | VueCompositionApi.Ref<Types.LocalesQueryVariables> | ReactiveFunction<Types.LocalesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> = {}) {
  18. return VueApolloComposable.useQuery<Types.LocalesQuery, Types.LocalesQueryVariables>(LocalesDocument, variables, options);
  19. }
  20. export function useLocalesLazyQuery(variables: Types.LocalesQueryVariables | VueCompositionApi.Ref<Types.LocalesQueryVariables> | ReactiveFunction<Types.LocalesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.LocalesQuery, Types.LocalesQueryVariables>> = {}) {
  21. return VueApolloComposable.useLazyQuery<Types.LocalesQuery, Types.LocalesQueryVariables>(LocalesDocument, variables, options);
  22. }
  23. export type LocalesQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.LocalesQuery, Types.LocalesQueryVariables>;