Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/content/8/en/part8b.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ The application can communicate with a GraphQL server using the *client* object.
import ReactDOM from 'react-dom/client'
import App from './App'

import { ApolloProvider } from '@apollo/client/react' // highlight-line

import {
ApolloClient,
ApolloProvider, // highlight-line
InMemoryCache,
} from '@apollo/client'

Expand All @@ -112,7 +113,8 @@ Currently, the use of the hook function [useQuery](https://www.apollographql.com
The query is made by the <i>App</i> component, the code of which is as follows:

```js
import { gql, useQuery } from '@apollo/client'
import { gql} from '@apollo/client'
import { useQuery } from '@apollo/client/react' // highlight-line

const ALL_PERSONS = gql`
query {
Expand Down Expand Up @@ -245,7 +247,8 @@ The solution is as follows:

```js
import { useState } from 'react'
import { gql, useQuery } from '@apollo/client'
import { gql } from '@apollo/client'
import { useQuery } from '@apollo/client/react'

const FIND_PERSON = gql`
query findPersonByName($nameToSearch: String!) {
Expand Down