Skip to content

Commit

Permalink
Merge pull request apollographql#6229 from dereckquock/master
Browse files Browse the repository at this point in the history
Fix grammar in api/link/introduction docs
  • Loading branch information
Stephen Barlow authored May 5, 2020
2 parents 5bd74df + c142cee commit f094fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/api/link/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const logTimeLink = new ApolloLink((operation, forward) => {
const link = timeStartLink.concat(logTimeLink)
```

This example shows defines links, `timeStartLink` and `logTimeLink`. The `timeStartLink` assigns the current time to the context's `start` field. When the operation completes, the `logTimeLink` then subtracts the value of `start` from the current time to determine the total duration of the operation.
This example defines two links, `timeStartLink` and `logTimeLink`. The `timeStartLink` assigns the current time to the context's `start` field. When the operation completes, the `logTimeLink` then subtracts the value of `start` from the current time to determine the total duration of the operation.

The context's initial value can be set by Apollo Client before the link chain begins its execution. In this example, a call to `client.query` adds a `saveOffline` field to the context, which is then read by the custom link defined at the top:

Expand Down

0 comments on commit f094fe6

Please sign in to comment.