Skip to content

Commit

Permalink
Docs: Fix typo in queries.md (#3602)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #3602

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

**Static Docs Preview: relay**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D31688836/V3/relay/)|

|**Modified Pages**|
|[docs/guided-tour/rendering/queries](https://our.intern.facebook.com/intern/staticdocs/eph/D31688836/V3/relay/docs/guided-tour/rendering/queries/)|

Reviewed By: alunyov

Differential Revision: D31688836

Pulled By: kassens

fbshipit-source-id: c16e8de021c7737b1cdac3572c6eb849e73b1ba1
  • Loading branch information
umbauk authored and facebook-github-bot committed Oct 18, 2021
1 parent ca62dd0 commit 639e547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/docs/guided-tour/rendering/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Lets see what's going on here:
* Similarly to [fragments](../fragments/), the component is automatically subscribed to updates to the query data: if the data for this query is updated anywhere in the app, the component will automatically re-render with the latest updated data.
* `useLazyLoadQuery` additionally takes a Flow type parameter, which corresponds to the Flow type for the query, in this case AppQuery.
* Remember that Relay automatically generates Flow types for any declared queries, which you can import and use with `useLazyLoadQuery`. These types are available in the generated files with the following name format: `<query_name>.graphql.js`.
* Note that the `variables` be will checked by Flow to ensure that you are passing values that match what the GraphQL query expects.
* Note that the `variables` will be checked by Flow to ensure that you are passing values that match what the GraphQL query expects.
* Note that the data is already properly Flow typed without requiring an explicit annotation, and is based on the types from the GraphQL schema. For example, the type of `data` above would be: `{ user: ?{ name: ?string } }`.
* By default, when the component renders, Relay will *fetch* the data for this query (if it isn't already cached), and return it as a the result of the `useLazyLoadQuery` call. We'll go into more detail about how to show loading states in the [Loading States with Suspense](../loading-states/) section, and how Relay uses cached data in the [Reusing Cached Data For Rendering](../../reusing-cached-data/) section.
* Note that if you re-render your component and pass *different query variables* than the ones originally used, it will cause the query to be fetched again with the new variables, and potentially re-render with different data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Lets see what's going on here:
* Similarly to [fragments](../fragments/), the component is automatically subscribed to updates to the query data: if the data for this query is updated anywhere in the app, the component will automatically re-render with the latest updated data.
* `useLazyLoadQuery` additionally takes a Flow type parameter, which corresponds to the Flow type for the query, in this case AppQuery.
* Remember that Relay automatically generates Flow types for any declared queries, which you can import and use with `useLazyLoadQuery`. These types are available in the generated files with the following name format: `<query_name>.graphql.js`.
* Note that the `variables` be will checked by Flow to ensure that you are passing values that match what the GraphQL query expects.
* Note that the `variables` will be checked by Flow to ensure that you are passing values that match what the GraphQL query expects.
* Note that the data is already properly Flow typed without requiring an explicit annotation, and is based on the types from the GraphQL schema. For example, the type of `data` above would be: `{ user: ?{ name: ?string } }`.
* By default, when the component renders, Relay will *fetch* the data for this query (if it isn't already cached), and return it as a the result of the `useLazyLoadQuery` call. We'll go into more detail about how to show loading states in the [Loading States with Suspense](../loading-states/) section, and how Relay uses cached data in the [Reusing Cached Data For Rendering](../../reusing-cached-data/) section.
* Note that if you re-render your component and pass *different query variables* than the ones originally used, it will cause the query to be fetched again with the new variables, and potentially re-render with different data.
Expand Down

0 comments on commit 639e547

Please sign in to comment.