Skip to content

Commit c93f59c

Browse files
fix grammar on graphql step 3
1 parent f7e53f6 commit c93f59c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tutorial/simple-todos-graphql/03-first-query.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export const App = () => {
100100
..
101101
```
102102
103-
Notice that in the query `tasksQuery` we just need the `_id` and the `text` as the `isChecked` is coming from the subscription, and we used the `createdAt` to sort the tasks in the server side, so we don't need it in the client side.
103+
Notice that in the query `tasksQuery` we just need the `_id` and the `text` as the `isChecked` is coming from the subscription, and we used the `createdAt` to sort the tasks on the server side, so we don't need it in the client side.
104104
105-
Now our tasks, fetched with GraphQL, have their status again, and the tasks' status were fetched with a subscription. When you do the changes and refresh your app again, all the tasks' text should now be visible.
105+
Now our tasks, fetched with GraphQL, have their status again, and the tasks' status was fetched with a subscription. When you do the changes and refresh your app again, all the tasks' text should now be visible.
106106
107107
## 3.2 Refetching Queries
108108
@@ -112,9 +112,9 @@ If you try to add or remove a task, nothing will happen until you refresh the pa
112112
113113
Everything was working before (and still it is with the toggle) because we were getting the tasks using the `useTracker` that will automatically fetch the data again if something changes. But now, we're getting the tasks with GraphQL and after an action that changes something in the background, we need a way to call the query again. With GraphQL, we have a couple of ways of doing it.
114114
115-
For now, let's use the function `refetch` that's returned from the hook `useQuery`, alongside with the `data` and the `loading`.
115+
For now, let's use the function `refetch` that's returned from the hook `useQuery`, alongside the `data` and the `loading`.
116116
117-
We'll need to pass forward this function to the `TaskForm` so we can call the query again as soon as the user adds a new task, and we need to call this function well someone tries to delete a task. The easiest way will be moving the delete function inside the `App` component.
117+
We'll need to pass forward this function to the `TaskForm` so we can call the query again as soon as the user adds a new task, and we need to call this function well someone tries to delete a task. The easiest way will be to move the delete function inside the `App` component.
118118
119119
`imports/ui/App.jsx`
120120
@@ -169,6 +169,6 @@ export const TaskForm = ({ refetch }) => {
169169
170170
Everything should be working again.
171171
172-
> Review: you can check how your code should be in the end of this step [here](https://github.com/meteor/react-tutorial/tree/master/src/simple-todos-graphql/step03)
172+
> Review: you can check how your code should be at the end of this step [here](https://github.com/meteor/react-tutorial/tree/master/src/simple-todos-graphql/step03)
173173
174174
In the next step we'll see how to use a mutation.

0 commit comments

Comments
 (0)