import * as Types from '../types.d' ; import { gql } from '@apollo/client' ; import * as Apollo from '@apollo/client' ; const defaultOptions = { } as const ; export type HeroParentTypeDependentFieldQueryVariables = Types . Exact < { episode ? : Types . InputMaybe < Types . Episode > ; } > ; export type HeroParentTypeDependentFieldQuery = { __typename ? : 'Query' ; hero ? : { __typename ? : 'Droid' ; name : string ; friends ? : Array < { __typename ? : 'Droid' ; name : string ; } | { __typename ? : 'Human' ; height ? : number | null | undefined ; name : string ; } | null | undefined > | null | undefined ; } | { __typename ? : 'Human' ; name : string ; friends ? : Array < { __typename ? : 'Droid' ; name : string ; } | { __typename ? : 'Human' ; height ? : number | null | undefined ; name : string ; } | null | undefined > | null | undefined ; } | null | undefined ; } ; export const HeroParentTypeDependentFieldDocument = gql `
  query HeroParentTypeDependentField($episode: Episode) {
    hero(episode: $episode) {
      name
      ... on Human {
        friends {
          name
          ... on Human {
            height(unit: FOOT)
          }
        }
      }
      ... on Droid {
        friends {
          name
          ... on Human {
            height(unit: METER)
          }
        }
      }
    }
  }
` ; param baseOptions example export function useHeroParentTypeDependentFieldQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useQuery < HeroParentTypeDependentFieldQuery , HeroParentTypeDependentFieldQueryVariables > ( HeroParentTypeDependentFieldDocument , options ) ; } export function useHeroParentTypeDependentFieldLazyQuery ( baseOptions ? ) { const options = { ... defaultOptions , ... baseOptions } ; return Apollo . useLazyQuery < HeroParentTypeDependentFieldQuery , HeroParentTypeDependentFieldQueryVariables > ( HeroParentTypeDependentFieldDocument , options ) ; } export type HeroParentTypeDependentFieldQueryHookResult = ReturnType < typeof useHeroParentTypeDependentFieldQuery > ; export type HeroParentTypeDependentFieldLazyQueryHookResult = ReturnType < typeof useHeroParentTypeDependentFieldLazyQuery > ; export type HeroParentTypeDependentFieldQueryResult = Apollo . QueryResult < HeroParentTypeDependentFieldQuery , HeroParentTypeDependentFieldQueryVariables > ;