Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StreamClientOptions

The set of options that can be used when constructing a the default StreamClient instance through the createStreamClient factory method.

Hierarchy

  • StreamClientOptions

Index

Properties

Optional autoDisconnectSocket

autoDisconnectSocket: undefined | false | true

When sets to true, when no more streams are active, the socket is automatically disconnected and close. This option should be set to false when using Query or Mutation over WebSocket transport to avoid opening/closing the WebSocket connection for each operation or when multiple short lived Subscriptions are used.

default

true

Optional autoRestartStreamsOnReconnect

autoRestartStreamsOnReconnect: undefined | false | true

Determines all streams should automatically restart when the socket disconnects. The stream will re-connect at their latest marked value (See Stream.mark) if present or at current block if it was never marked.

default

true

Optional socket

socket: Socket

The Socket instance to use, inferred based on the environment when not provided.

default

undefined (Inferred based on runtime environment (Node.js/Browser), see createSocket)

Optional socketOptions

socketOptions: SocketOptions

The SocketOptions to pass when creating the default Socket instance. This field has no effect if you provide yourself a StreamClientOptions.socket option.

default

undefined (See SocketOptions for actual defaults this generates)

Generated using TypeDoc