Skip to content

Commit

Permalink
fix typos (#3577)
Browse files Browse the repository at this point in the history
Summary:
Made corrections to the typos i found in the documentations.

Pull Request resolved: #3577

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

|[Site Preview: relay](https://our.intern.facebook.com/intern/staticdocs/eph/D30697644/V2/relay/)

Reviewed By: alunyov

Differential Revision: D30697644

Pulled By: kassens

fbshipit-source-id: 4dee315c936e93e4bb04c0fece6323591cbfb60a
  • Loading branch information
saintmalik authored and facebook-github-bot committed Sep 1, 2021
1 parent 022646e commit 847e72b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion website/docs/api-reference/relay-runtime/fetch-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fetchQuery<AppQuery>(
### Return Value

* `observable`: Returns an observable instance. To start the request, `subscribe` or `toPromise` must be called on the observable. Exposes the following methods:
* `susbcribe`: Function that can be called to subscribe to the observable for the network request
* `subscribe`: Function that can be called to subscribe to the observable for the network request
* Arguments:
* `observer`: Object that specifies observer functions for different events occurring on the network request observable. May specify the following event handlers as keys in the observer object:
* `start`: Function that will be called when the network requests starts. It will receive a single `subscription` argument, which represents the subscription on the network observable.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/guides/persisted-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In your `npm` script in `package.json`, run the relay compiler using the `--pers
}
```

The `--persist-ouput` flag does 2 things:
The `--persist-output` flag does 2 things:

1. It converts all query and mutation operation texts to md5 hashes.

Expand Down Expand Up @@ -137,7 +137,7 @@ to push the query map at compile time to a location accessible by your server:
```javascript
"scripts": {
"push-queries": "node ./pushQueries.js",
"relay": "relay-compiler --src ./src --schema ./schema.graphql --persist-ouput <path> && npm run push-queries"
"relay": "relay-compiler --src ./src --schema ./schema.graphql --persist-output <path> && npm run push-queries"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ CurrencyAmount(context) {

This is more straightforward - it is done via a call to `environment.mock.queuePendingOperation(query, variables)`

* `Query` needs to match the query issues by the component. Simplest (and most robust agains query changes) is to export the query from the component module and use it in the test, but having an *identical* (but not the same) query works as well.
* `Query` needs to match the query issues by the component. Simplest (and most robust against query changes) is to export the query from the component module and use it in the test, but having an *identical* (but not the same) query works as well.
* `variables` has to match the variables that will be used in this test invocation.
* Beware of nested objects and arrays - they are compared via `areEqual` ([invocation code](https://github.com/facebook/relay/blob/046f758c6b411608371d4cc2f0a594ced331864e/packages/relay-test-utils/RelayModernMockEnvironment.js#L233))
* Arrays are compared by values (not by reference), but the order of elements matter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module.exports = Relay.createContainer(ProfilePicture, {
});
```

In this example, `profilePicture(size: 50)` will be fetched for the intial render.
In this example, `profilePicture(size: 50)` will be fetched for the initial render.

### prepareVariables

Expand Down Expand Up @@ -459,7 +459,7 @@ class Feed extends React.Component {
var node = edge.node;
if (this.props.relay.hasOptimisticUpdate(node)) {
// Render pending story that has not been stored
// on the server using a diffrent component.
// on the server using a different component.
return (
<PendingStory
key={edge.node.id}
Expand Down Expand Up @@ -558,7 +558,7 @@ module.exports = Relay.createContainer(ProfilePicture, {
- `COMMIT_QUEUED` — Transaction was committed but another transaction with the same collision key is pending, so the transaction has been queued to send to the server.
- `COLLISION_COMMIT_FAILED` — Transaction was queued for commit but another transaction with the same collision key failed. All transactions in the collision queue, including this one, have been failed. Transaction can be recommitted or rolled back.
- `COMMITTING` — Transaction is waiting for the server to respond.
- `COMMIT_FAILED` — Transaction was sent to the server for comitting but failed.
- `COMMIT_FAILED` — Transaction was sent to the server for committing but failed.

## Static Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ function App() {
The provided `fetchPolicy` will determine:
- _if_ the query should be fulfilled from the local cache, and
- _if_ a network request should be made to fetch the query from the server, depending on the [availablity of the data for that query in the store](#availability-of-cached-data).
- _if_ a network request should be made to fetch the query from the server, depending on the [availability of the data for that query in the store](#availability-of-cached-data).
By default, Relay will try to read the query from the local cache; if any piece of data for that query is [missing](#presence-of-data) or [stale](#staleness-of-data), it will fetch the entire query from the network. This default `fetchPolicy` is called "**_store-or-network"._**
Expand Down Expand Up @@ -1418,7 +1418,7 @@ function ProfilePage(props) {
)

// Here we subscribe to changes in invalidation state for the given user ID.
// Whenever the user whith that ID is marked as stale, the provided callback will
// Whenever the user with that ID is marked as stale, the provided callback will
// be executed*
useSubscribeToInvalidationState([props.userID], () => {
// Here we can do things like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ fetchQuery<AppQuery>(
#### Return Value
- `observable`: Returns an observable instance. To start the request, `subscribe` or `toPromise` must be called on the observable. Exposes the following methods:
- `susbcribe`: Function that can be called to subscribe to the observable for the network request
- `subscribe`: Function that can be called to subscribe to the observable for the network request
- Arguments:
- `observer`: Object that specifies observer functions for different events occurring on the network request observable. May specify the following event handlers as keys in the observer object:
- `start`: Function that will be called when the network requests starts. It will receive a single `subscription` argument, which represents the subscription on the network observable.
Expand Down

0 comments on commit 847e72b

Please sign in to comment.