Skip to content

Commit aca3352

Browse files
committed
Update options section
1 parent 06fcf08 commit aca3352

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/source/api/link/apollo-link-subscriptions.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ constructor(
2828

2929
### Options
3030

31-
The `GraphQLWsLink` constructor takes a single argument, which is a `Client` returned from the `graphql-ws` `createClient` function.
31+
The `GraphQLWsLink` constructor takes a single argument, which is a `Client` returned from the `graphql-ws` [`createClient`](https://the-guild.dev/graphql/ws/docs/client/functions/createClient) function. The `createClient` function requires the `url` option, which is the URL to your WebSocket server (typically starting with `ws://` or `wss://`, which are the equivalents of `http://` and `https://` respectively.)
3232

33-
The `createClient` function can take many options, described in the [`graphql-ws` docs for `ClientOptions`](https://the-guild.dev/graphql/ws/docs/client/interfaces/ClientOptions). The `url` option is required, which is the URL to your WebSocket server (typically starting with `ws://` or `wss://`, which are the equivalents of `http://` and `https://` respectively.)
33+
See the [`ClientOptions`](https://the-guild.dev/graphql/ws/docs/client/interfaces/ClientOptions) documentation for more details on the supported options provided to the `createClient` function.
34+
35+
#### Retrying failed connections
36+
37+
See the [`graphql-ws` recipes](https://the-guild.dev/graphql/ws/recipes) for strategies on retrying failed connections from the client. We recommend this approach as it provides more detailed information on the reason the connection failed.
38+
39+
You can also handle retries in the link chain in a more generic manner using the [`RetryLink`](./apollo-link-retry) to resend the operation to the terminating link.
3440

3541
## Usage
3642

0 commit comments

Comments
 (0)