loadGraph(name, component, metadata) {
    const graphComponent = /** @type {ModuleComponent} */ (this.components.Graph);
    return this.createComponent(name, graphComponent, metadata)
      .then((graph) => {
        const g = /** @type {import("../components/Graph").Graph} */ (graph);
        g.loader = this;
        g.baseDir = this.baseDir;
        g.inPorts.remove('graph');
        this.setIcon(name, g);
        return g.setGraph(component)
          .then(() => g);
      });
  }
@protected
@param {string} name
@param {import("fbp-graph").Graph} component
@param {import("fbp-graph/lib/Types").GraphNodeMetadata} metadata
@returns {Promise<import("../components/Graph").Graph>}