import * as Types from '../types.d' ; import { gql } from '@apollo/client' ; import * as Apollo from '@apollo/client' ; const defaultOptions = { } as const ; export type TwoHeroesQueryVariables = Types . Exact < { [ key ] : never ; } > ; export type TwoHeroesQuery = { __typename ? : 'Query' ; r2 ? : { __typename ? : 'Droid' ; name : string ; } | { __typename ? : 'Human' ; name : string ; } | null | undefined ; luke ? : { __typename ? : 'Droid' ; name : string ; } | { __typename ? : 'Human' ; name : string ; } | null | undefined ; } ; export const TwoHeroesDocument = gql `
  query TwoHeroes {
    r2: hero {
      name
    }
    luke: hero(episode: EMPIRE) {
      name
    }
  }
` ; param baseOptions example export function useTwoHeroesQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useQuery < TwoHeroesQuery , TwoHeroesQueryVariables > ( TwoHeroesDocument , options ) ; } export function useTwoHeroesLazyQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useLazyQuery < TwoHeroesQuery , TwoHeroesQueryVariables > ( TwoHeroesDocument , options ) ; } export type TwoHeroesQueryHookResult = ReturnType < typeof useTwoHeroesQuery > ; export type TwoHeroesLazyQueryHookResult = ReturnType < typeof useTwoHeroesLazyQuery > ; export type TwoHeroesQueryResult = Apollo . QueryResult < TwoHeroesQuery , TwoHeroesQueryVariables > ;