File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed
Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ const authLink = setContext((_, { headers }) => {
180180// highlight-end
181181
182182const httpLink = createHttpLink ({
183- uri: ' /graphql ' ,
183+ uri: ' http://localhost:4000 ' ,
184184})
185185
186186const client = new ApolloClient ({
Original file line number Diff line number Diff 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
716716The 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.
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ const authLink = setContext((_, { headers }) => {
180180// highlight-end
181181
182182const httpLink = createHttpLink ({
183- uri: ' /graphql ' ,
183+ uri: ' http://localhost:4000 ' ,
184184})
185185
186186const client = new ApolloClient ({
Original file line number Diff line number Diff 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
713713npm install graphql-ws
You can’t perform that action at this time.
0 commit comments