session.api.ts 1.5 KB

12345678910111213141516171819202122
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { SessionFragmentDoc } from '../fragments/session.api';
  4. import * as VueApolloComposable from '@vue/apollo-composable';
  5. import * as VueCompositionApi from 'vue';
  6. export type ReactiveFunction<TParam> = () => TParam;
  7. export const SessionDocument = gql`
  8. query session {
  9. session {
  10. ...session
  11. }
  12. }
  13. ${SessionFragmentDoc}`;
  14. export function useSessionQuery(options: VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables>> = {}) {
  15. return VueApolloComposable.useQuery<Types.SessionQuery, Types.SessionQueryVariables>(SessionDocument, {}, options);
  16. }
  17. export function useSessionLazyQuery(options: VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.SessionQuery, Types.SessionQueryVariables>> = {}) {
  18. return VueApolloComposable.useLazyQuery<Types.SessionQuery, Types.SessionQueryVariables>(SessionDocument, {}, options);
  19. }
  20. export type SessionQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.SessionQuery, Types.SessionQueryVariables>;