@@ -35,7 +35,7 @@ We'll start with the following code for our application:
3535import ReactDOM from ' react-dom/client'
3636import App from ' ./App'
3737
38- import { ApolloClient , HttpLink , InMemoryCache , gql } from ' @apollo/client' ;
38+ import { ApolloClient , HttpLink , InMemoryCache , gql } from ' @apollo/client'
3939
4040const client = new ApolloClient ({
4141 link: new HttpLink ({ uri: ' http://localhost:4000' }),
@@ -84,8 +84,8 @@ The application can communicate with a GraphQL server using the *client* object.
8484import ReactDOM from ' react-dom/client'
8585import App from ' ./App'
8686
87- import { ApolloClient , HttpLink , InMemoryCache } from ' @apollo/client' ;
88- import { ApolloProvider } from ' @apollo/client/react' ; // highlight-line
87+ import { ApolloClient , HttpLink , InMemoryCache } from ' @apollo/client'
88+ import { ApolloProvider } from ' @apollo/client/react' // highlight-line
8989
9090const client = new ApolloClient ({
9191 link: new HttpLink ({ uri: ' http://localhost:4000' }),
@@ -109,8 +109,8 @@ Currently, the use of the hook function [useQuery](https://www.apollographql.com
109109The query is made by the <i >App</i > component, the code of which is as follows:
110110
111111``` js
112- import { gql } from ' @apollo/client' ;
113- import { useQuery } from ' @apollo/client/react' ;
112+ import { gql } from ' @apollo/client'
113+ import { useQuery } from ' @apollo/client/react'
114114
115115const ALL_PERSONS = gql `
116116query {
@@ -243,8 +243,8 @@ The solution is as follows:
243243
244244``` js
245245import { useState } from ' react'
246- import { gql } from ' @apollo/client' ;
247- import { useQuery } from ' @apollo/client/react' ;
246+ import { gql } from ' @apollo/client'
247+ import { useQuery } from ' @apollo/client/react'
248248
249249const FIND_PERSON = gql `
250250 query findPersonByName ($nameToSearch : String ! ) {
@@ -400,8 +400,8 @@ Let's create a new component for adding a new person to the directory:
400400
401401``` js
402402import { useState } from ' react'
403- import { gql } from ' @apollo/client' ;
404- import { useMutation } from ' @apollo/client/react' ;
403+ import { gql } from ' @apollo/client'
404+ import { useMutation } from ' @apollo/client/react'
405405
406406const CREATE_PERSON = gql `
407407 // ...
@@ -686,7 +686,7 @@ Interesting lines on the code have been highlighted.
686686
687687` ` ` js
688688import { useState } from ' react'
689- import { useMutation } from ' @apollo/client/react' ;
689+ import { useMutation } from ' @apollo/client/react'
690690
691691import { EDIT_NUMBER } from ' ../queries'
692692
0 commit comments