Skip to content

Commit

Permalink
Merge pull request #7627 from apollographql/sb/broken-links
Browse files Browse the repository at this point in the history
Fix a few broken links in the docs
  • Loading branch information
Stephen Barlow committed Jul 5, 2023
2 parents 17d1a67 + 97a3de7 commit 0d3cd08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/source/builtin-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can also [create custom plugins](./integrations/plugins/).
| Name | Description | Location |
|------|---------|-------------|
| [Usage reporting](./api/plugin/usage-reporting/) | Gathers helpful operation usage data and reports it to [GraphOS](/graphos/) for visualization, alerting, and more. |`@apollo/server/plugin/usageReporting` |
| [Schema reporting](./api/plugin/schema-reporting/) | Automatically reports the server's schema to [Apollo Studio](/studio/) on startup to enable schema history and up-to-date metrics. | `@apollo/server/plugin/schemaReporting` |
| [Schema reporting](./api/plugin/schema-reporting/) | Automatically reports the server's schema to [GraphOS](/graphos/) on startup to enable schema history and up-to-date metrics. | `@apollo/server/plugin/schemaReporting` |
| [Inline trace](./api/plugin/inline-trace/) | Used primarily by [federated subgraphs](https://www.apollographql.com/docs/federation/) to include operation trace data in responses to the gateway. | `@apollo/server/plugin/inlineTrace` |
| [Cache control](./api/plugin/cache-control/) | Calculates caching behavior for operation responses. | `@apollo/server/plugin/cacheControl` |
| [Landing page (multiple)](./api/plugin/landing-pages) | Handle displaying a default or custom landing page at Apollo Server's base URL. | `@apollo/server/plugin/landingPage/default` |
Expand Down
22 changes: 12 additions & 10 deletions docs/source/data/subscriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ title: Subscriptions in Apollo Server
description: Persistent GraphQL read operations
---

>**Apollo Server does not provide built-in support for subscriptions.** You can enable support for subscriptions as [described below](#enabling-subscriptions).
>
> **Subscriptions are not currently supported in [Apollo Federation](/federation/).**
>
> This article uses the `graphql-ws` library to add support for subscriptions to Apollo Server 4. We no longer recommend using the previously documented `subscriptions-transport-ws`, because this library is not actively maintained. For more information about the differences between the two libraries, see [Switching from `subscriptions-transport-ws`](#switching-from-subscriptions-transport-ws).
<blockquote>

**Apollo Server does not provide built-in support for subscriptions.** You can enable support for subscriptions as [described below](#enabling-subscriptions).

This article uses the `graphql-ws` library to add support for subscriptions to Apollo Server 4. We no longer recommend using the previously documented `subscriptions-transport-ws`, because this library is not actively maintained. For more information about the differences between the two libraries, see [Switching from `subscriptions-transport-ws`](#switching-from-subscriptions-transport-ws).

</blockquote>

**Subscriptions** are long-lasting GraphQL read operations that can update their result whenever a particular server-side event occurs. Most commonly, updated results are _pushed_ from the server to subscribing clients. For example, a chat application's server might use a subscription to push newly received messages to all clients in a particular chat room.

Expand Down Expand Up @@ -205,7 +207,7 @@ httpServer.listen(PORT, () => {

</ExpansionPanel>

> 鈿狅笍 **Running into an error?** If you're using the `graphql-ws` library, your specified subscription protocol must be consistent across your backend, frontend, and **every other tool** you use (including [Apollo Sandbox](/graphos/explorer/additional-features/#subscription-support)). For more information, see [Switching from `subscriptions-transport-ws`](#switching-from-subscriptions-transport-ws).
> 鈿狅笍 **Running into an error?** If you're using the `graphql-ws` library, your specified subscription protocol must be consistent across your backend, frontend, and **every other tool** you use (including [Apollo Sandbox](/graphos/explorer/subscriptions-explorer)). For more information, see [Switching from `subscriptions-transport-ws`](#switching-from-subscriptions-transport-ws).
## Resolving a subscription

Expand Down Expand Up @@ -411,7 +413,7 @@ subscription IncrementingNumber {
}
```

> If you don't see the result of your subscription operation you might need to [adjust your Sandbox settings to use the `graphql-ws` protocol](/graphos/explorer/additional-features/#subscription-support).
> If you don't see the result of your subscription operation you might need to [adjust your Sandbox settings to use the `graphql-ws` protocol](/graphos/explorer/subscriptions-explorer).
After you start up the server in CodeSandbox, follow the instructions in the browser to test running the `numberIncremented` subscription in Apollo Sandbox. You should see the subscription's value update every second.

Expand Down Expand Up @@ -588,7 +590,7 @@ If none of these libraries fits your use case, you can also create your own `Pub

## Switching from `subscriptions-transport-ws`

> If you use subscriptions with Apollo Client you must ensure **[both your client and server subscription protocols are consistent](/react/data/subscriptions/#choosing-a-subscription-library)** for the subscription library you're using.
> If you use subscriptions with Apollo Client you must ensure **[both your client and server subscription protocols are consistent](/react/data/subscriptions/#supported-subscription-protocols)** for the subscription library you're using.
This article previously demonstrated using the `subscriptions-transport-ws` library to set up subscriptions. However, this library is no longer actively maintained. You can still use it with Apollo Server, but we strongly recommend using [`graphql-ws`](https://www.npmjs.com/package/graphql-ws) instead.

Expand Down Expand Up @@ -617,13 +619,13 @@ If you intend to [switch from `subscriptions-transport-ws` to `graphql-ws`](/apo

<td>

[`graphql-ws`](/graphos/explorer/additional-features/#subscription-support)
[`graphql-ws`](/graphos/explorer/subscriptions-explorer)

</td>

<td>

[`subscriptions-transport-ws`](/graphos/explorer/additional-features/#subscription-support)
[`subscriptions-transport-ws`](/graphos/explorer/subscriptions-explorer)

</td>

Expand Down

0 comments on commit 0d3cd08

Please sign in to comment.