ticketWithMentionLimit.api.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { TicketAttributesFragmentDoc } from '../../../../../../shared/entities/ticket/graphql/fragments/ticketAttributes.api';
  4. import { TicketMentionFragmentDoc } from '../../../../../../shared/entities/ticket/graphql/fragments/ticketMention.api';
  5. import * as VueApolloComposable from '@vue/apollo-composable';
  6. import * as VueCompositionApi from 'vue';
  7. export type ReactiveFunction<TParam> = () => TParam;
  8. export const TicketWithMentionLimitDocument = gql`
  9. query ticketWithMentionLimit($ticketId: ID, $ticketInternalId: Int, $ticketNumber: String, $mentionsCount: Int = null) {
  10. ticket(
  11. ticket: {ticketId: $ticketId, ticketInternalId: $ticketInternalId, ticketNumber: $ticketNumber}
  12. ) {
  13. ...ticketAttributes
  14. createArticleType {
  15. id
  16. name
  17. }
  18. mentions(first: $mentionsCount) {
  19. totalCount
  20. edges {
  21. node {
  22. ...ticketMention
  23. }
  24. cursor
  25. }
  26. }
  27. }
  28. }
  29. ${TicketAttributesFragmentDoc}
  30. ${TicketMentionFragmentDoc}`;
  31. export function useTicketWithMentionLimitQuery(variables: Types.TicketWithMentionLimitQueryVariables | VueCompositionApi.Ref<Types.TicketWithMentionLimitQueryVariables> | ReactiveFunction<Types.TicketWithMentionLimitQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>> = {}) {
  32. return VueApolloComposable.useQuery<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>(TicketWithMentionLimitDocument, variables, options);
  33. }
  34. export function useTicketWithMentionLimitLazyQuery(variables: Types.TicketWithMentionLimitQueryVariables | VueCompositionApi.Ref<Types.TicketWithMentionLimitQueryVariables> | ReactiveFunction<Types.TicketWithMentionLimitQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>> = {}) {
  35. return VueApolloComposable.useLazyQuery<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>(TicketWithMentionLimitDocument, variables, options);
  36. }
  37. export type TicketWithMentionLimitQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.TicketWithMentionLimitQuery, Types.TicketWithMentionLimitQueryVariables>;