Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Spelling and grammar fixes (#872)

authored by

Michael Stramel and committed by
GitHub
481ff4ca 52a26079

+3 -3
+3 -3
docs/advanced/subscriptions.md
··· 31 31 In the above example, we add the `subscriptionExchange` to the `Client` with the default exchanges 32 32 add before it. The `subscriptionExchange` is a factory that accepts additional options and returns 33 33 the actual `Exchange` function. It does not make any assumption over the transport protocol and 34 - scheme that is used. Instead we need to pass a `forwardSubscription` function which is called with 34 + scheme that is used. Instead, we need to pass a `forwardSubscription` function which is called with 35 35 an "enriched" _Operation_ every time the `Client` attempts to execute a GraphQL Subscription. 36 36 37 37 When we define this function it must return an "Observable-like" object, which needs to follow the ··· 84 84 list for example. 85 85 86 86 In the following example, we create a subscription that informs us of 87 - new messages. We will concatenate the incoming messages, so that we 87 + new messages. We will concatenate the incoming messages so that we 88 88 can display all messages that have come in over the subscription across 89 89 events. 90 90 ··· 132 132 133 133 ## One-off Subscriptions 134 134 135 - Whe you're using subscriptions directly without `urql`'s framework bindings, you can use the `Client`'s `subscription` method for one-off subscriptions. This method is similar to the ones for mutations and subscriptions [that we've seen before on the "Core Package" page.](../concepts/core-package.md#one-off-queries-and-mutations) 135 + When you're using subscriptions directly without `urql`'s framework bindings, you can use the `Client`'s `subscription` method for one-off subscriptions. This method is similar to the ones for mutations and subscriptions [that we've seen before on the "Core Package" page.](../concepts/core-package.md#one-off-queries-and-mutations) 136 136 137 137 This method will always [returns a Wonka stream](../concepts/stream-patterns.md#the-wonka-library) and doesn't have a `.toPromise()` shortcut method, since promises won't return the multiple values that a subscription may deliver. Let's convert the above example to one without framework code, as we may use subscriptions in a Node.js environment. 138 138