import { gql } from '@apollo/client' ; import * as Apollo from '@apollo/client' ; export type Maybe < T > = T | null ; export type Exact < T extends { [ key ] : unknown ; } > = { [ K in keyof T ] : T [ K ] ; } ; export type MakeOptional < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] ? : Maybe < T [ SubKey ] > ; } ; export type MakeMaybe < T , K extends keyof T > = Omit < T , K > & { [ SubKey in K ] : Maybe < T [ SubKey ] > ; } ; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID : string ; String : string ; Boolean : boolean ; Int : number ; Float : number ; } ; export type Launch = { __typename ? : 'Launch' ; id : Scalars [ 'ID' ] ; site ? : Maybe < Scalars [ 'String' ] > ; mission ? : Maybe < Mission > ; rocket ? : Maybe < Rocket > ; isBooked ? : Maybe < Scalars [ 'Boolean' ] > ; } ; export type Rocket = { __typename ? : 'Rocket' ; id : Scalars [ 'ID' ] ; name ? : Maybe < Scalars [ 'String' ] > ; type ? : Maybe < Scalars [ 'String' ] > ; } ; export type Mission = { __typename ? : 'Mission' ; name ? : Maybe < Scalars [ 'String' ] > ; missionPatch ? : Maybe < Scalars [ 'String' ] > ; } ; export type MissionMissionPatchArgs = { size ? : Maybe < PatchSize > ; } ; export type LaunchConnection = { __typename ? : 'LaunchConnection' ; cursor ? : Maybe < Scalars [ 'String' ] > ; hasMore : Scalars [ 'Boolean' ] ; launches : Array < Maybe < Launch > > ; } ; export enum PatchSize { Small = 'SMALL' , Large = 'LARGE' } export type Query = { __typename ? : 'Query' ; launch ? : Maybe < Launch > ; launches : LaunchConnection ; me ? : Maybe < User > ; } ; export type QueryLaunchArgs = { id : Scalars [ 'ID' ] ; } ; export type QueryLaunchesArgs = { pageSize ? : Maybe < Scalars [ 'Int' ] > ; cursor ? : Maybe < Scalars [ 'String' ] > ; } ; export type User = { __typename ? : 'User' ; id : Scalars [ 'ID' ] ; email : Scalars [ 'String' ] ; trips ? : Maybe < Array < Maybe < Launch > > > ; } ; export type Mutation = { __typename ? : 'Mutation' ; login ? : Maybe < Scalars [ 'String' ] > ; bookTrips : TripUpdateResponse ; cancelTrip : TripUpdateResponse ; } ; export type MutationLoginArgs = { email : Scalars [ 'String' ] ; } ; export type MutationBookTripsArgs = { launchIds : Array < Maybe < Scalars [ 'ID' ] > > ; } ; export type MutationCancelTripArgs = { launchId : Scalars [ 'ID' ] ; } ; export type TripUpdateResponse = { __typename ? : 'TripUpdateResponse' ; success : Scalars [ 'Boolean' ] ; message ? : Maybe < Scalars [ 'String' ] > ; launches ? : Maybe < Array < Maybe < Launch > > > ; } ; export type LaunchResultFragment = ( { __typename ? : 'Launch' ; } & Pick < Launch , 'id' | 'site' > & { rocket ? : Maybe < ( { __typename ? : 'Rocket' ; } & Pick < Rocket , 'id' | 'name' | 'type' > ) > ; } ) ; export type GetLaunchesQueryVariables = Exact < { size ? : Maybe < PatchSize > ; cursor ? : Maybe < Scalars [ 'String' ] > ; } > ; export type GetLaunchesQuery = ( { __typename ? : 'Query' ; } & { launches : ( { __typename ? : 'LaunchConnection' ; } & Pick < LaunchConnection , 'hasMore' | 'cursor' > & { launches : Array < Maybe < ( { __typename ? : 'Launch' ; } & { mission ? : Maybe < ( { __typename ? : 'Mission' ; } & Pick < Mission , 'name' | 'missionPatch' > ) > ; } & LaunchResultFragment ) > > ; } ) ; } ) ; export type GetLaunchQueryVariables = Exact < { id : Scalars [ 'ID' ] ; size ? : Maybe < PatchSize > ; } > ; export type GetLaunchQuery = ( { __typename ? : 'Query' ; } & { launch ? : Maybe < ( { __typename ? : 'Launch' ; } & { mission ? : Maybe < ( { __typename ? : 'Mission' ; } & Pick < Mission , 'name' | 'missionPatch' > ) > ; } & LaunchResultFragment ) > ; } ) ; export type GetLaunchAndMeQueryVariables = Exact < { id : Scalars [ 'ID' ] ; size ? : Maybe < PatchSize > ; } > ; export type GetLaunchAndMeQuery = ( { __typename ? : 'Query' ; } & { launch ? : Maybe < ( { __typename ? : 'Launch' ; } & Pick < Launch , 'isBooked' > & { mission ? : Maybe < ( { __typename ? : 'Mission' ; } & Pick < Mission , 'name' | 'missionPatch' > ) > ; } & LaunchResultFragment ) > ; me ? : Maybe < ( { __typename ? : 'User' ; } & UserResultFragment ) > ; } ) ; export type UserResultFragment = ( { __typename ? : 'User' ; } & Pick < User , 'id' | 'email' > ) ; export type TripUpdateResultFragment = ( { __typename ? : 'TripUpdateResponse' ; } & Pick < TripUpdateResponse , 'success' | 'message' > & { launches ? : Maybe < Array < Maybe < ( { __typename ? : 'Launch' ; } & { mission ? : Maybe < ( { __typename ? : 'Mission' ; } & Pick < Mission , 'name' | 'missionPatch' > ) > ; } & LaunchResultFragment ) > > > ; } ) ; export type MyTripsQueryVariables = Exact < { [ key ] : never ; } > ; export type MyTripsQuery = ( { __typename ? : 'Query' ; } & { me ? : Maybe < ( { __typename ? : 'User' ; } & { trips ? : Maybe < Array < Maybe < ( { __typename ? : 'Launch' ; } & { mission ? : Maybe < ( { __typename ? : 'Mission' ; } & Pick < Mission , 'name' | 'missionPatch' > ) > ; } & LaunchResultFragment ) > > > ; } & UserResultFragment ) > ; } ) ; export type LoginMutationVariables = Exact < { email : Scalars [ 'String' ] ; } > ; export type LoginMutation = ( { __typename ? : 'Mutation' ; } & Pick < Mutation , 'login' > ) ; export type BookTripsMutationVariables = Exact < { ids : Array < Maybe < Scalars [ 'ID' ] > > ; } > ; export type BookTripsMutation = ( { __typename ? : 'Mutation' ; } & { bookTrips : ( { __typename ? : 'TripUpdateResponse' ; } & TripUpdateResultFragment ) ; } ) ; export type CancelTripMutationVariables = Exact < { id : Scalars [ 'ID' ] ; } > ; export type CancelTripMutation = ( { __typename ? : 'Mutation' ; } & { cancelTrip : ( { __typename ? : 'TripUpdateResponse' ; } & TripUpdateResultFragment ) ; } ) ; export const UserResultFragmentDoc = gql `
    fragment UserResult on User {
  id
  email
}
    ` ; export const LaunchResultFragmentDoc = gql `
    fragment LaunchResult on Launch {
  id
  site
  rocket {
    id
    name
    type
  }
}
    ` ; export const TripUpdateResultFragmentDoc = gql `
    fragment TripUpdateResult on TripUpdateResponse {
  success
  message
  launches {
    ...LaunchResult
    mission {
      name
      missionPatch(size: LARGE)
    }
  }
}
    ${ LaunchResultFragmentDoc }` ; export const GetLaunchesDocument = gql `
    query GetLaunches($size: PatchSize, $cursor: String) {
  launches(cursor: $cursor) {
    hasMore
    cursor
    launches {
      ...LaunchResult
      mission {
        name
        missionPatch(size: $size)
      }
    }
  }
}
    ${ LaunchResultFragmentDoc }` ; param baseOptions example export function useGetLaunchesQuery ( baseOptions ? ) { return Apollo . useQuery < GetLaunchesQuery , GetLaunchesQueryVariables > ( GetLaunchesDocument , baseOptions ) ; } export function useGetLaunchesLazyQuery ( baseOptions ? ) { return Apollo . useLazyQuery < GetLaunchesQuery , GetLaunchesQueryVariables > ( GetLaunchesDocument , baseOptions ) ; } export type GetLaunchesQueryHookResult = ReturnType < typeof useGetLaunchesQuery > ; export type GetLaunchesLazyQueryHookResult = ReturnType < typeof useGetLaunchesLazyQuery > ; export type GetLaunchesQueryResult = Apollo . QueryResult < GetLaunchesQuery , GetLaunchesQueryVariables > ; export const GetLaunchDocument = gql `
    query GetLaunch($id: ID!, $size: PatchSize) {
  launch(id: $id) {
    ...LaunchResult
    mission {
      name
      missionPatch(size: $size)
    }
  }
}
    ${ LaunchResultFragmentDoc }` ; param baseOptions example export function useGetLaunchQuery ( baseOptions ) { return Apollo . useQuery < GetLaunchQuery , GetLaunchQueryVariables > ( GetLaunchDocument , baseOptions ) ; } export function useGetLaunchLazyQuery ( baseOptions ? ) { return Apollo . useLazyQuery < GetLaunchQuery , GetLaunchQueryVariables > ( GetLaunchDocument , baseOptions ) ; } export type GetLaunchQueryHookResult = ReturnType < typeof useGetLaunchQuery > ; export type GetLaunchLazyQueryHookResult = ReturnType < typeof useGetLaunchLazyQuery > ; export type GetLaunchQueryResult = Apollo . QueryResult < GetLaunchQuery , GetLaunchQueryVariables > ; export const GetLaunchAndMeDocument = gql `
    query GetLaunchAndMe($id: ID!, $size: PatchSize) {
  launch(id: $id) {
    ...LaunchResult
    mission {
      name
      missionPatch(size: $size)
    }
    isBooked
  }
  me {
    ...UserResult
  }
}
    ${ LaunchResultFragmentDoc }
${ UserResultFragmentDoc }` ; param baseOptions example export function useGetLaunchAndMeQuery ( baseOptions ) { return Apollo . useQuery < GetLaunchAndMeQuery , GetLaunchAndMeQueryVariables > ( GetLaunchAndMeDocument , baseOptions ) ; } export function useGetLaunchAndMeLazyQuery ( baseOptions ? ) { return Apollo . useLazyQuery < GetLaunchAndMeQuery , GetLaunchAndMeQueryVariables > ( GetLaunchAndMeDocument , baseOptions ) ; } export type GetLaunchAndMeQueryHookResult = ReturnType < typeof useGetLaunchAndMeQuery > ; export type GetLaunchAndMeLazyQueryHookResult = ReturnType < typeof useGetLaunchAndMeLazyQuery > ; export type GetLaunchAndMeQueryResult = Apollo . QueryResult < GetLaunchAndMeQuery , GetLaunchAndMeQueryVariables > ; export const MyTripsDocument = gql `
    query MyTrips {
  me {
    ...UserResult
    trips {
      ...LaunchResult
      mission {
        name
        missionPatch(size: LARGE)
      }
    }
  }
}
    ${ UserResultFragmentDoc }
${ LaunchResultFragmentDoc }` ; param baseOptions example export function useMyTripsQuery ( baseOptions ? ) { return Apollo . useQuery < MyTripsQuery , MyTripsQueryVariables > ( MyTripsDocument , baseOptions ) ; } export function useMyTripsLazyQuery ( baseOptions ? ) { return Apollo . useLazyQuery < MyTripsQuery , MyTripsQueryVariables > ( MyTripsDocument , baseOptions ) ; } export type MyTripsQueryHookResult = ReturnType < typeof useMyTripsQuery > ; export type MyTripsLazyQueryHookResult = ReturnType < typeof useMyTripsLazyQuery > ; export type MyTripsQueryResult = Apollo . QueryResult < MyTripsQuery , MyTripsQueryVariables > ; export const LoginDocument = gql `
    mutation Login($email: String!) {
  login(email: $email)
}
    ` ; export type LoginMutationFn = Apollo . MutationFunction < LoginMutation , LoginMutationVariables > ; param baseOptions example export function useLoginMutation ( baseOptions ? ) { return Apollo . useMutation < LoginMutation , LoginMutationVariables > ( LoginDocument , baseOptions ) ; } export type LoginMutationHookResult = ReturnType < typeof useLoginMutation > ; export type LoginMutationResult = Apollo . MutationResult < LoginMutation > ; export type LoginMutationOptions = Apollo . BaseMutationOptions < LoginMutation , LoginMutationVariables > ; export const BookTripsDocument = gql `
    mutation BookTrips($ids: [ID]!) {
  bookTrips(launchIds: $ids) {
    ...TripUpdateResult
  }
}
    ${ TripUpdateResultFragmentDoc }` ; export type BookTripsMutationFn = Apollo . MutationFunction < BookTripsMutation , BookTripsMutationVariables > ; param baseOptions example export function useBookTripsMutation ( baseOptions ? ) { return Apollo . useMutation < BookTripsMutation , BookTripsMutationVariables > ( BookTripsDocument , baseOptions ) ; } export type BookTripsMutationHookResult = ReturnType < typeof useBookTripsMutation > ; export type BookTripsMutationResult = Apollo . MutationResult < BookTripsMutation > ; export type BookTripsMutationOptions = Apollo . BaseMutationOptions < BookTripsMutation , BookTripsMutationVariables > ; export const CancelTripDocument = gql `
    mutation CancelTrip($id: ID!) {
  cancelTrip(launchId: $id) {
    ...TripUpdateResult
  }
}
    ${ TripUpdateResultFragmentDoc }` ; export type CancelTripMutationFn = Apollo . MutationFunction < CancelTripMutation , CancelTripMutationVariables > ; param baseOptions example export function useCancelTripMutation ( baseOptions ? ) { return Apollo . useMutation < CancelTripMutation , CancelTripMutationVariables > ( CancelTripDocument , baseOptions ) ; } export type CancelTripMutationHookResult = ReturnType < typeof useCancelTripMutation > ; export type CancelTripMutationResult = Apollo . MutationResult < CancelTripMutation > ; export type CancelTripMutationOptions = Apollo . BaseMutationOptions < CancelTripMutation , CancelTripMutationVariables > ;