ticketUpdates.api.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { TicketAttributesFragmentDoc } from '../fragments/ticketAttributes.api';
  4. import { TicketMentionFragmentDoc } from '../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 TicketUpdatesDocument = gql`
  9. subscription ticketUpdates($ticketId: ID!) {
  10. ticketUpdates(ticketId: $ticketId) {
  11. ticket {
  12. ...ticketAttributes
  13. mentions {
  14. totalCount
  15. edges {
  16. node {
  17. ...ticketMention
  18. }
  19. cursor
  20. }
  21. }
  22. }
  23. }
  24. }
  25. ${TicketAttributesFragmentDoc}
  26. ${TicketMentionFragmentDoc}`;
  27. export function useTicketUpdatesSubscription(variables: Types.TicketUpdatesSubscriptionVariables | VueCompositionApi.Ref<Types.TicketUpdatesSubscriptionVariables> | ReactiveFunction<Types.TicketUpdatesSubscriptionVariables>, options: VueApolloComposable.UseSubscriptionOptions<Types.TicketUpdatesSubscription, Types.TicketUpdatesSubscriptionVariables> | VueCompositionApi.Ref<VueApolloComposable.UseSubscriptionOptions<Types.TicketUpdatesSubscription, Types.TicketUpdatesSubscriptionVariables>> | ReactiveFunction<VueApolloComposable.UseSubscriptionOptions<Types.TicketUpdatesSubscription, Types.TicketUpdatesSubscriptionVariables>> = {}) {
  28. return VueApolloComposable.useSubscription<Types.TicketUpdatesSubscription, Types.TicketUpdatesSubscriptionVariables>(TicketUpdatesDocument, variables, options);
  29. }
  30. export type TicketUpdatesSubscriptionCompositionFunctionResult = VueApolloComposable.UseSubscriptionReturn<Types.TicketUpdatesSubscription, Types.TicketUpdatesSubscriptionVariables>;