Commit 5284542
authored
fixed wrong variable name running-an-express-graphql-server.mdx
Issue
The server throws an error because the root variable is not defined. The correct variable name should be rootValue, which was previously declared in the code.
Fix
Updated rootValue in the createHandler function to use the correct variable name.
Changes
Replaced root with rootValue in the GraphQL handler configuration.1 parent 7066b58 commit 5284542
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments