From 31a5a86a20a65d27e40563f6e1ae41f1001c6085 Mon Sep 17 00:00:00 2001 From: EledenGreen <114846457+EledenGreen@users.noreply.github.com> Date: Tue, 22 Oct 2024 07:03:01 +0530 Subject: [PATCH] updated link in part8b.md --- src/content/8/en/part8b.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/8/en/part8b.md b/src/content/8/en/part8b.md index 2468e0ae54..a9a2d07a7f 100644 --- a/src/content/8/en/part8b.md +++ b/src/content/8/en/part8b.md @@ -65,7 +65,7 @@ client.query({ query }) ReactDOM.createRoot(document.getElementById('root')).render() ``` -The beginning of the code creates a new [client](https://www.apollographql.com/docs/react/get-started/#create-a-client) object, which is then used to send a query to the server: +The beginning of the code creates a new [client](https://www.apollographql.com/docs/react/get-started#step-3-initialize-apolloclient) object, which is then used to send a query to the server: ```js client.query({ query }) @@ -78,7 +78,7 @@ The server's response is printed to the console: ![devtools shows allPersons array with 3 people](../../images/8/9a.png) -The application can communicate with a GraphQL server using the *client* object. The client can be made accessible for all components of the application by wrapping the App component with [ApolloProvider](https://www.apollographql.com/docs/react/get-started/#connect-your-client-to-react). +The application can communicate with a GraphQL server using the *client* object. The client can be made accessible for all components of the application by wrapping the App component with [ApolloProvider](https://www.apollographql.com/docs/react/get-started#step-4-connect-your-client-to-react). ```js import ReactDOM from 'react-dom/client' @@ -239,7 +239,7 @@ The *useQuery* hook is well-suited for situations where the query is done when t One possibility for this kind of situations is the hook function [useLazyQuery](https://www.apollographql.com/docs/react/api/react/hooks/#uselazyquery) that would make it possible to define a query which is executed when the user wants to see the detailed information of a person. -However, in our case we can stick to *useQuery* and use the option [skip](https://www.apollographql.com/docs/react/data/queries/#skip), which makes it possible to do the query only if a set condition is true. +However, in our case we can stick to *useQuery* and use the option [skip](https://www.apollographql.com/docs/react/data/queries#skipoptional), which makes it possible to do the query only if a set condition is true. The solution is as follows: