author import { GraphQLInterfaceType , GraphQLList , GraphQLNonNull , GraphQLObjectType , GraphQLType , GraphQLUnionType } from "graphql" ; export function targetTypeOf ( type ) { if ( type instanceof GraphQLNonNull ) { return targetTypeOf ( type . ofType ) ; } if ( type instanceof GraphQLList ) { return targetTypeOf ( type . ofType ) ; } if ( type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType || type instanceof GraphQLUnionType ) { return type ; } return undefined ; } export function instancePrefix ( name ) { return name . substring ( 0 , 1 ) . toLowerCase ( ) + name . substring ( 1 ) ; }