user.api.ts 1.9 KB

12345678910111213141516171819202122232425
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { UserDetailAttributesFragmentDoc } from '../../../../../../shared/graphql/fragments/userDetailAttributes.api';
  4. import * as VueApolloComposable from '@vue/apollo-composable';
  5. import * as VueCompositionApi from 'vue';
  6. export type ReactiveFunction<TParam> = () => TParam;
  7. export const UserDocument = gql`
  8. query user($userId: ID, $userInternalId: Int, $secondaryOrganizationsCount: Int) {
  9. user(user: {userId: $userId, userInternalId: $userInternalId}) {
  10. ...userDetailAttributes
  11. policy {
  12. update
  13. }
  14. }
  15. }
  16. ${UserDetailAttributesFragmentDoc}`;
  17. export function useUserQuery(variables: Types.UserQueryVariables | VueCompositionApi.Ref<Types.UserQueryVariables> | ReactiveFunction<Types.UserQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> = {}) {
  18. return VueApolloComposable.useQuery<Types.UserQuery, Types.UserQueryVariables>(UserDocument, variables, options);
  19. }
  20. export function useUserLazyQuery(variables: Types.UserQueryVariables | VueCompositionApi.Ref<Types.UserQueryVariables> | ReactiveFunction<Types.UserQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.UserQuery, Types.UserQueryVariables>> = {}) {
  21. return VueApolloComposable.useLazyQuery<Types.UserQuery, Types.UserQueryVariables>(UserDocument, variables, options);
  22. }
  23. export type UserQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.UserQuery, Types.UserQueryVariables>;