From de13dd67d6c3444fd839044d2eda3c8568136491 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Wed, 25 Sep 2024 10:14:12 -0400 Subject: [PATCH] [DOCS-3435] README: Fix Event Streaming config link --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cb3df23e..d50d5e38 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ See the [Fauna Documentation](https://docs.fauna.com/fauna/current/) for additio - [The Official JavaScript Driver for Fauna.](#the-official-javascript-driver-for-fauna) - [Supported runtimes](#supported-runtimes) + - [API reference](#api-reference) - [Install](#install) - [Usage](#usage) - [Write FQL queries](#write-fql-queries) @@ -465,9 +466,9 @@ const client = new Client({ http2_session_idle_ms: 6000 }); > **Warning** > Setting `http2_session_idle_ms` to small values can lead to a race condition where requests cannot be transmitted before the session is closed, yielding `ERR_HTTP2_GOAWAY_SESSION` errors. -## Event streaming +## Event Streaming -The driver supports [event streaming](https://docs.fauna.com/fauna/current/learn/streaming). +The driver supports [Event Streaming](https://docs.fauna.com/fauna/current/learn/streaming). ### Start a stream @@ -575,10 +576,10 @@ for await (const event of stream) { The [client configuration](#client-configuration) sets default options for the `stream()` method. -You can pass an `options` object to override these defaults: +You can pass an `StreamClientConfiguration` object to override these defaults: ```javascript -const options = { +const options: StreamClientConfiguration = { long_type: "number", max_attempts: 5, max_backoff: 1000, @@ -590,9 +591,9 @@ const options = { client.stream(fql`Product.all().toStream()`, options); ``` -For supported properties, see [Stream -options](https://docs.fauna.com/fauna/current/drivers/js-client#stream-options) -in the Fauna docs. +For supported properties, see +[StreamClientConfiguration](https://fauna.github.io/fauna-js/latest/types/StreamClientConfiguration.html) +in the API reference. ## Contributing