import * as Types from '../types.d' ; import { gql } from '@apollo/client' ; import * as Apollo from '@apollo/client' ; const defaultOptions = { } as const ; export type HeroDetailsQueryVariables = Types . Exact < { episode ? : Types . InputMaybe < Types . Episode > ; } > ; export type HeroDetailsQuery = { __typename ? : 'Query' ; hero ? : { __typename ? : 'Droid' ; primaryFunction ? : string | null | undefined ; name : string ; } | { __typename ? : 'Human' ; height ? : number | null | undefined ; name : string ; } | null | undefined ; } ; export const HeroDetailsDocument = gql `
  query HeroDetails($episode: Episode) {
    hero(episode: $episode) {
      name
      ... on Human {
        height
      }
      ... on Droid {
        primaryFunction
      }
    }
  }
` ; param baseOptions example export function useHeroDetailsQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useQuery < HeroDetailsQuery , HeroDetailsQueryVariables > ( HeroDetailsDocument , options ) ; } export function useHeroDetailsLazyQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useLazyQuery < HeroDetailsQuery , HeroDetailsQueryVariables > ( HeroDetailsDocument , options ) ; } export type HeroDetailsQueryHookResult = ReturnType < typeof useHeroDetailsQuery > ; export type HeroDetailsLazyQueryHookResult = ReturnType < typeof useHeroDetailsLazyQuery > ; export type HeroDetailsQueryResult = Apollo . QueryResult < HeroDetailsQuery , HeroDetailsQueryVariables > ;