code: function getTypeInfo (obj, info) {
    const constructorName = _.constructorName(obj)
    const _info = info || {
      type: null,
      name: null,
      isList: false,
      isNonNull: false
    }
  
    switch (constructorName) {
      case 'GraphQLNonNull':
        _info.isNonNull = true
        return getTypeInfo(obj.ofType, _info)
      case 'GraphQLList':
        _info.isList = true
        return getTypeInfo(obj.ofType, _info)
      default:
        _info.type = obj
        _info.name = obj.name
    }
    return _info
  }
docs: Strips away nonnull and list objects to
  build an info object containing the type
  @param obj
  @param info
  @returns {*}