Skip to content

Commit

Permalink
docs: note error in subscriptions doc (#5496)
Browse files Browse the repository at this point in the history
See #5472.
  • Loading branch information
glasser committed Jul 16, 2021
1 parent 177cd25 commit 836a446
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/data/subscriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ After you start up the server in CodeSandbox, follow the instructions in the bro

## Operation context

(Oops! This section hasn't been updated for Apollo Server 3. [We'll fix it soon!](https://github.com/apollographql/apollo-server/issues/5472))

When [initializing context](../data/resolvers/#the-context-argument) for a query or mutation, you usually extract HTTP headers and other request metadata from the `req` object provided to the `context` function.

**For subscriptions,** you extract this metadata from the `connection` object instead. This object adheres to the [`ExecutionParams` interface](https://github.com/apollographql/subscriptions-transport-ws/blob/817e7de3a23db2b4d64eb846724175dba74025d0/src/server.ts#L24-L33).
Expand Down

0 comments on commit 836a446

Please sign in to comment.