ChainGraph API Documentation / @badaitech/chaingraph-types / EdgeTransferService
Class: EdgeTransferService
Defined in: packages/chaingraph-types/src/flow/edge-transfer-service.ts:21
Service responsible for transferring data through edges. This service fetches fresh node and port instances from the flow to avoid synchronization issues with stale references.
Constructors
Constructor
new EdgeTransferService(
flow):EdgeTransferService
Defined in: packages/chaingraph-types/src/flow/edge-transfer-service.ts:22
Parameters
flow
Returns
EdgeTransferService
Methods
transfer()
transfer(
edge):Promise<IEdge>
Defined in: packages/chaingraph-types/src/flow/edge-transfer-service.ts:33
Transfer data from source to target through an edge. Fetches fresh instances from the flow to ensure synchronization. Returns a new edge with updated references.
Parameters
edge
The edge to transfer data through
Returns
Promise<IEdge>
A new edge with updated node and port references
Throws
Error if transfer cannot be completed