Skip to content

Commit bdff923

Browse files
authored
Merge pull request #158 from illusionalsagacity/get-examples-working-again
fix: EXAMPLES wasn't working
2 parents 457d965 + 92d6fcc commit bdff923

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

EXAMPLES/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Examples for rescript-apollo-client",
55
"private": true,
66
"scripts": {
7+
"build": "rescript build -with-deps",
78
"clean": "rescript clean",
89
"graphql-server": "graphql-client-example-server",
910
"server": "webpack-dev-server",
@@ -20,12 +21,11 @@
2021
},
2122
"dependencies": {
2223
"@apollo/client": "3.7.6",
23-
"@rescript/react": "0.11.0",
24+
"@rescript/react": "~0.11.0",
2425
"@ryyppy/rescript-promise": "2.1.0",
2526
"graphql": "^15.7.2",
26-
"react": "18.2.0",
27-
"react-dom": "18.2.0",
28-
"reason-promise": "1.1.5",
27+
"react": "18.3.1",
28+
"react-dom": "18.3.1",
2929
"rescript-apollo-client": "3.2.0",
3030
"subscriptions-transport-ws": "0.11.0"
3131
}

EXAMPLES/src/Apollo.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let graphqlEndpoint = "localhost:4000"
1+
let graphqlEndpoint = "localhost:4000/graphql"
22

33
let headers = {"high": "five"}
44

EXAMPLES/src/WebpackEntry.res

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
switch ReactDOM.querySelector("#root") {
2-
| Some(el) => ReactDOM.Client.createRoot(el)->ReactDOM.Client.Root.render(<App />)
2+
| Some(el) =>
3+
ReactDOM.render(
4+
<React.StrictMode>
5+
<App />
6+
</React.StrictMode>,
7+
el,
8+
)
39
| None => ()
410
}

EXAMPLES/src/clientUsage/ClientBasics.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ let statsSubscription = Apollo.client.subscribe(
7474
let make = () =>
7575
<div>
7676
<p>
77-
<button onClick=logTodos> {"Log To-Dos (Reason Promise)"->React.string} </button>
77+
<button onClick=logTodos> {"Log To-Dos"->React.string} </button>
7878
</p>
7979
<p>
8080
<button onClick=addTodo> {"Add To-Do"->React.string} </button>

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"@apollo/client": "^3.5.0",
2525
"@reasonml-community/graphql-ppx": "1.2.4-1345e061.0",
2626
"@rescript/react": "~0.11.0",
27-
"rescript": "~10.1.2",
2827
"graphql": "^15.0.0",
2928
"jest": "26.5.3",
30-
"react": "^18.2.0",
31-
"react-dom": "^18.2.0",
29+
"react": "^18.3.1",
30+
"react-dom": "^18.3.1",
31+
"rescript": "~10.1.2",
3232
"subscriptions-transport-ws": "^0.9.17"
3333
},
3434
"peerDependencies": {
@@ -45,5 +45,9 @@
4545
"bs-platform": {
4646
"optional": true
4747
}
48-
}
48+
},
49+
"workspaces": [
50+
"EXAMPLES",
51+
"./"
52+
]
4953
}

0 commit comments

Comments
 (0)