code: function processObjectType(object: GraphQLObjectType) {
    return reduce(object._typeConfig, (def, value, key) => {
      if (value !== undefined) {
        switch (key) {
          case 'interfaces':
            const interfaces = object.getInterfaces();
            if (interfaces.length) {
              def.interfaces = interfaces.map(({ name }) => name);
            }
            break;
          case 'fields':
            def.fields = reduce(object.getFields(), (fields, field, name) => {
              fields[name] = processField(field);
              return fields;
            }, Object.create(null));
            break;
          case 'isTypeOf':
            set(def, key, value, (typeof value === 'function'));
            break;
          case 'description':
            set(def, key, value, (value !== ''));
            break;
          case 'astNode':
            const directives = extractDirectives(get(object, [ 'astNode' ]));
            set(def, '@directives', directives, Boolean(directives));
            break;
          default:
            break;
        }
      }
      return def;
    }, {
      type: 'Object'
    });
  }
docs: Converts an object type to Factory definition
  @param {*} object