import { TypeKind , IntrospectionTypeRef , IntrospectionListTypeRef , IntrospectionNonNullTypeRef , IntrospectionNamedTypeRef , } from "graphql" ; param { GraphQLType } type const getFinalType = ( type ) : IntrospectionNamedTypeRef => { if ( type . kind === TypeKind . NON_NULL || type . kind === TypeKind . LIST ) { return getFinalType ( ( type as IntrospectionListTypeRef | IntrospectionNonNullTypeRef ) . ofType ! ) ; } return type as IntrospectionNamedTypeRef ; } ; export default getFinalType ;