Type alias ExchangeIO

ExchangeIO: ((ops$) => Source<OperationResult>)

Type declaration

    • (ops$): Source<OperationResult>
    • Returned by Exchanges, the ExchangeIO function are the composed pipeline functions.

      Remarks

      An Exchange must return an ExchangeIO function, which accepts a stream of Operations which this exchange handles and returns a stream of OperationResults. These streams are Wonka Sources.

      An exchange may enhance the incoming stream of Operations to add, filter, map (change), or remove Operations, before forwarding those to forward, using Wonka's operators, and may add or remove OperationResults from the returned stream.

      Generally, the stream of OperationResult returned by forward is always merged and combined with the Exchange's own stream of results if the Exchange creates and delivers results of its own.

      See

      https://urql.dev/goto/docs/advanced/authoring-exchanges on how Exchanges are authored.

      Parameters

      Returns Source<OperationResult>

Generated using TypeDoc