import * as Types from '../types.d' ; import { gql } from '@apollo/client' ; import * as Apollo from '@apollo/client' ; const defaultOptions = { } as const ; export type HeroNameQueryVariables = Types . Exact < { episode ? : Types . InputMaybe < Types . Episode > ; } > ; export type HeroNameQuery = { __typename ? : 'Query' ; hero ? : { __typename ? : 'Droid' ; name : string ; } | { __typename ? : 'Human' ; name : string ; } | null | undefined ; } ; export const HeroNameDocument = gql `
  query HeroName($episode: Episode) {
    hero(episode: $episode) {
      name
    }
  }
` ; param baseOptions example export function useHeroNameQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useQuery < HeroNameQuery , HeroNameQueryVariables > ( HeroNameDocument , options ) ; } export function useHeroNameLazyQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useLazyQuery < HeroNameQuery , HeroNameQueryVariables > ( HeroNameDocument , options ) ; } export type HeroNameQueryHookResult = ReturnType < typeof useHeroNameQuery > ; export type HeroNameLazyQueryHookResult = ReturnType < typeof useHeroNameLazyQuery > ; export type HeroNameQueryResult = Apollo . QueryResult < HeroNameQuery , HeroNameQueryVariables > ;