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
11 changes: 8 additions & 3 deletions src/content/8/en/part8b.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ We'll start with the following code for our application:
import ReactDOM from 'react-dom/client'
import App from './App'

import { ApolloClient, InMemoryCache, gql } from '@apollo/client'
import { ApolloClient, InMemoryCache, HttpLink, gql } from '@apollo/client'

const client = new ApolloClient({
uri: 'http://localhost:4000',
cache: new InMemoryCache(),
link: new HttpLink({
uri: 'http://localhost:4000',
}),
})

const query = gql`
Expand Down Expand Up @@ -87,12 +89,15 @@ import App from './App'
import {
ApolloClient,
ApolloProvider, // highlight-line
HttpLink,
InMemoryCache,
} from '@apollo/client'

const client = new ApolloClient({
uri: 'http://localhost:4000',
cache: new InMemoryCache(),
link: new HttpLink({
uri: 'http://localhost:4000',
}),
})

ReactDOM.createRoot(document.getElementById('root')).render(
Expand Down