node_modules/graphql-compose/lib/InterfaceTypeComposer.js
/**
   * Clone this type to another SchemaComposer.
   * Also will be clonned all sub-types.
   */
Clone this type to another SchemaComposer.
Also will be clonned all sub-types.
Clone this type to another SchemaComposer . Also will be clonned all sub - types .
cloneTo(anotherSchemaComposer, cloneMap = new Map()) {
    if (!anotherSchemaComposer) {
      throw new Error('You should provide SchemaComposer for InterfaceTypeComposer.cloneTo()');
    }
    if (cloneMap.has(this)) return cloneMap.get(this);
    const cloned = InterfaceTypeComposer.create(this.getTypeName(), anotherSchemaComposer);
    cloneMap.set(this, cloned);
    cloned._gqcFields = (0, _misc.mapEachKey)(this._gqcFields, fieldConfig => _objectSpread({}, fieldConfig, {
      type: (0, _typeHelpers.cloneTypeTo)(fieldConfig.type, anotherSchemaComposer, cloneMap),
      args: (0, _misc.mapEachKey)(fieldConfig.args, argConfig => _objectSpread({}, argConfig, {
        type: (0, _typeHelpers.cloneTypeTo)(argConfig.type, anotherSchemaComposer, cloneMap),
        extensions: _objectSpread({}, argConfig.extensions)
      })),
      extensions: _objectSpread({}, fieldConfig.extensions)
    }));
    cloned._gqcExtensions = _objectSpread({}, this._gqcExtensions);
    cloned.setDescription(this.getDescription()); 
    const typeResolversMap = this.getTypeResolvers();
    if (typeResolversMap.size > 0) {
      const clonedTypeResolvers = new Map();
      typeResolversMap.forEach((fn, tc) => {
        const clonedTC = (0, _typeHelpers.cloneTypeTo)(tc, anotherSchemaComposer, cloneMap);
        clonedTypeResolvers.set(clonedTC, fn);
      });
      cloned.setTypeResolvers(clonedTypeResolvers);
    }
    return cloned;
  }
cloneTo ( anotherSchemaComposer , cloneMap = new Map ( ) ) { if ( ! anotherSchemaComposer ) { throw new Error ( 'You should provide SchemaComposer for InterfaceTypeComposer.cloneTo()' ) ; } if ( cloneMap . has ( this ) ) return cloneMap . get ( this ) ; const cloned = InterfaceTypeComposer . create ( this . getTypeName ( ) , anotherSchemaComposer ) ; cloneMap . set ( this , cloned ) ; cloned . _gqcFields = ( 0 , _misc . mapEachKey ) ( this . _gqcFields , fieldConfig => _objectSpread ( { } , fieldConfig , { type : ( 0 , _typeHelpers . cloneTypeTo ) ( fieldConfig . type , anotherSchemaComposer , cloneMap ) , args : ( 0 , _misc . mapEachKey ) ( fieldConfig . args , argConfig => _objectSpread ( { } , argConfig , { type : ( 0 , _typeHelpers . cloneTypeTo ) ( argConfig . type , anotherSchemaComposer , cloneMap ) , extensions : _objectSpread ( { } , argConfig . extensions ) } ) ) , extensions : _objectSpread ( { } , fieldConfig . extensions ) } ) ) ; cloned . _gqcExtensions = _objectSpread ( { } , this . _gqcExtensions ) ; cloned . setDescription ( this . getDescription ( ) ) ; const typeResolversMap = this . getTypeResolvers ( ) ; if ( typeResolversMap . size > 0 ) { const clonedTypeResolvers = new Map ( ) ; typeResolversMap . forEach ( ( fn , tc ) => { const clonedTC = ( 0 , _typeHelpers . cloneTypeTo ) ( tc , anotherSchemaComposer , cloneMap ) ; clonedTypeResolvers . set ( clonedTC , fn ) ; } ) ; cloned . setTypeResolvers ( clonedTypeResolvers ) ; } return cloned ; }
Clone this type to another SchemaComposer.
Clone this type to another SchemaComposer .
// clone this._gqcTypeResolvers