-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(myTransfer): accept transfered ticket
- Loading branch information
Showing
5 changed files
with
250 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
app/components/MyTransfers/graphql/acceptTransferedTicket.generated.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* eslint-disable @typescript-eslint/ban-ts-comment */ | ||
// @ts-nocheck | ||
/* eslint-disable */ | ||
/* prettier-ignore */ | ||
/* This file is automatically generated. Please do not modify it manually. */ | ||
import * as Types from '../../../api/gql/graphql'; | ||
|
||
import { gql } from "graphql-tag"; | ||
import * as Apollo from "@apollo/client"; | ||
const defaultOptions = {} as const; | ||
export type AcceptTransferredTicketMutationVariables = Types.Exact<{ | ||
transferId: Types.Scalars["String"]["input"]; | ||
}>; | ||
|
||
export type AcceptTransferredTicketMutation = { | ||
__typename?: "Mutation"; | ||
acceptTransferredTicket: { | ||
__typename?: "UserTicketTransfer"; | ||
id: string; | ||
status: Types.TicketTransferAttemptStatus; | ||
userTicket: { | ||
__typename?: "UserTicket"; | ||
id: string; | ||
user?: { __typename?: "User"; id: string } | null; | ||
}; | ||
}; | ||
}; | ||
|
||
export const AcceptTransferredTicketDocument = gql` | ||
mutation AcceptTransferredTicket($transferId: String!) { | ||
acceptTransferredTicket(transferId: $transferId) { | ||
id | ||
status | ||
userTicket { | ||
id | ||
user { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
export type AcceptTransferredTicketMutationFn = Apollo.MutationFunction< | ||
AcceptTransferredTicketMutation, | ||
AcceptTransferredTicketMutationVariables | ||
>; | ||
|
||
/** | ||
* __useAcceptTransferredTicketMutation__ | ||
* | ||
* To run a mutation, you first call `useAcceptTransferredTicketMutation` within a React component and pass it any options that fit your needs. | ||
* When your component renders, `useAcceptTransferredTicketMutation` returns a tuple that includes: | ||
* - A mutate function that you can call at any time to execute the mutation | ||
* - An object with fields that represent the current status of the mutation's execution | ||
* | ||
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; | ||
* | ||
* @example | ||
* const [acceptTransferredTicketMutation, { data, loading, error }] = useAcceptTransferredTicketMutation({ | ||
* variables: { | ||
* transferId: // value for 'transferId' | ||
* }, | ||
* }); | ||
*/ | ||
export function useAcceptTransferredTicketMutation( | ||
baseOptions?: Apollo.MutationHookOptions< | ||
AcceptTransferredTicketMutation, | ||
AcceptTransferredTicketMutationVariables | ||
>, | ||
) { | ||
const options = { ...defaultOptions, ...baseOptions }; | ||
return Apollo.useMutation< | ||
AcceptTransferredTicketMutation, | ||
AcceptTransferredTicketMutationVariables | ||
>(AcceptTransferredTicketDocument, options); | ||
} | ||
export type AcceptTransferredTicketMutationHookResult = ReturnType< | ||
typeof useAcceptTransferredTicketMutation | ||
>; | ||
export type AcceptTransferredTicketMutationResult = | ||
Apollo.MutationResult<AcceptTransferredTicketMutation>; | ||
export type AcceptTransferredTicketMutationOptions = Apollo.BaseMutationOptions< | ||
AcceptTransferredTicketMutation, | ||
AcceptTransferredTicketMutationVariables | ||
>; |
12 changes: 12 additions & 0 deletions
12
app/components/MyTransfers/graphql/acceptTransferedTicket.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mutation AcceptTransferredTicket($transferId: String!) { | ||
acceptTransferredTicket(transferId: $transferId) { | ||
id | ||
status | ||
userTicket { | ||
id | ||
user { | ||
id | ||
} | ||
} | ||
} | ||
} |