templates.api.ts 1.8 KB

12345678910111213141516171819202122
  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 TemplatesDocument = gql`
  7. query templates($onlyActive: Boolean = false) {
  8. templates(onlyActive: $onlyActive) {
  9. id
  10. name
  11. }
  12. }
  13. `;
  14. export function useTemplatesQuery(variables: Types.TemplatesQueryVariables | VueCompositionApi.Ref<Types.TemplatesQueryVariables> | ReactiveFunction<Types.TemplatesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables>> = {}) {
  15. return VueApolloComposable.useQuery<Types.TemplatesQuery, Types.TemplatesQueryVariables>(TemplatesDocument, variables, options);
  16. }
  17. export function useTemplatesLazyQuery(variables: Types.TemplatesQueryVariables | VueCompositionApi.Ref<Types.TemplatesQueryVariables> | ReactiveFunction<Types.TemplatesQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TemplatesQuery, Types.TemplatesQueryVariables>> = {}) {
  18. return VueApolloComposable.useLazyQuery<Types.TemplatesQuery, Types.TemplatesQueryVariables>(TemplatesDocument, variables, options);
  19. }
  20. export type TemplatesQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.TemplatesQuery, Types.TemplatesQueryVariables>;