Skip to content

Commit 2e1af65

Browse files
committed
tweaks part 8
1 parent 2bd5fba commit 2e1af65

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/content/1/en/part1d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ If and <i>when</i> you encounter an error message
10581058

10591059
> <i>Objects are not valid as a React child</i>
10601060
1061-
keep in mind the things told [here](/en/part1/introduction_to_react#do-not-rended-object).
1061+
keep in mind the things told [here](/en/part1/introduction_to_react#do-not-render-object).
10621062

10631063
<h4> 1.6: unicafe step1</h4>
10641064

src/content/8/en/part8d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const authLink = setContext((_, { headers }) => {
180180
// highlight-end
181181

182182
const httpLink = createHttpLink({
183-
uri: '/graphql',
183+
uri: 'http://localhost:4000',
184184
})
185185

186186
const client = new ApolloClient({

src/content/8/en/part8e.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ const start = async () => {
488488

489489
// highlight-start
490490
const schema = makeExecutableSchema({ typeDefs, resolvers })
491-
const serverCleanup = useServer({ schema }, wsServer);
491+
const serverCleanup = useServer({ schema }, wsServer)
492492
// highlight-end
493493

494494
const server = new ApolloServer({
@@ -668,7 +668,7 @@ const authLink = setContext((_, { headers }) => {
668668
return {
669669
headers: {
670670
...headers,
671-
authorization: token ? `bearer ${token}` : null,
671+
authorization: token ? `Bearer ${token}` : null,
672672
}
673673
}
674674
})
@@ -707,10 +707,10 @@ ReactDOM.createRoot(document.getElementById('root')).render(
707707
)
708708
```
709709

710-
For this to work, we have to install some dependencies:
710+
For this to work, we have to install a dependency:
711711

712712
```bash
713-
npm install @apollo/client graphql-ws
713+
npm install graphql-ws
714714
```
715715

716716
The new configuration is due to the fact that the application must have an HTTP connection as well as a WebSocket connection to the GraphQL server.

src/content/8/fi/osa8d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const authLink = setContext((_, { headers }) => {
180180
// highlight-end
181181

182182
const httpLink = createHttpLink({
183-
uri: '/graphql',
183+
uri: 'http://localhost:4000',
184184
})
185185

186186
const client = new ApolloClient({

src/content/8/fi/osa8e.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ const start = async () => {
487487

488488
// highlight-start
489489
const schema = makeExecutableSchema({ typeDefs, resolvers })
490-
const serverCleanup = useServer({ schema }, wsServer);
490+
const serverCleanup = useServer({ schema }, wsServer)
491491
// highlight-end
492492

493493
const server = new ApolloServer({
@@ -668,7 +668,7 @@ const authLink = setContext((_, { headers }) => {
668668
return {
669669
headers: {
670670
...headers,
671-
authorization: token ? `bearer ${token}` : null,
671+
authorization: token ? `Bearer ${token}` : null,
672672
}
673673
}
674674
})
@@ -707,7 +707,7 @@ ReactDOM.createRoot(document.getElementById('root')).render(
707707
)
708708
```
709709

710-
Jotta kaikki toimisi, on asennettava uusia riippuvuuksia:
710+
Jotta kaikki toimisi, on asennettava uusi riippuvuus:
711711

712712
```bash
713713
npm install graphql-ws

0 commit comments

Comments
 (0)