organization.api.ts 2.3 KB

123456789101112131415161718192021222324252627282930
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { OrganizationAttributesFragmentDoc } from '../fragments/organizationAttributes.api';
  4. import { OrganizationMembersFragmentDoc } from '../fragments/organizationMembers.api';
  5. import * as VueApolloComposable from '@vue/apollo-composable';
  6. import * as VueCompositionApi from 'vue';
  7. export type ReactiveFunction<TParam> = () => TParam;
  8. export const OrganizationDocument = gql`
  9. query organization($organizationId: ID, $organizationInternalId: Int, $membersCount: Int) {
  10. organization(
  11. organization: {organizationId: $organizationId, organizationInternalId: $organizationInternalId}
  12. ) {
  13. policy {
  14. update
  15. }
  16. ...organizationAttributes
  17. ...organizationMembers
  18. }
  19. }
  20. ${OrganizationAttributesFragmentDoc}
  21. ${OrganizationMembersFragmentDoc}`;
  22. export function useOrganizationQuery(variables: Types.OrganizationQueryVariables | VueCompositionApi.Ref<Types.OrganizationQueryVariables> | ReactiveFunction<Types.OrganizationQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> = {}) {
  23. return VueApolloComposable.useQuery<Types.OrganizationQuery, Types.OrganizationQueryVariables>(OrganizationDocument, variables, options);
  24. }
  25. export function useOrganizationLazyQuery(variables: Types.OrganizationQueryVariables | VueCompositionApi.Ref<Types.OrganizationQueryVariables> | ReactiveFunction<Types.OrganizationQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.OrganizationQuery, Types.OrganizationQueryVariables>> = {}) {
  26. return VueApolloComposable.useLazyQuery<Types.OrganizationQuery, Types.OrganizationQueryVariables>(OrganizationDocument, variables, options);
  27. }
  28. export type OrganizationQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.OrganizationQuery, Types.OrganizationQueryVariables>;