Skip to content

Commit

Permalink
Merge pull request #158 from illusionalsagacity/get-examples-working-…
Browse files Browse the repository at this point in the history
…again

fix: EXAMPLES wasn't working
  • Loading branch information
jeddeloh authored Oct 16, 2024
2 parents 457d965 + 92d6fcc commit bdff923
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
8 changes: 4 additions & 4 deletions EXAMPLES/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Examples for rescript-apollo-client",
"private": true,
"scripts": {
"build": "rescript build -with-deps",
"clean": "rescript clean",
"graphql-server": "graphql-client-example-server",
"server": "webpack-dev-server",
Expand All @@ -20,12 +21,11 @@
},
"dependencies": {
"@apollo/client": "3.7.6",
"@rescript/react": "0.11.0",
"@rescript/react": "~0.11.0",
"@ryyppy/rescript-promise": "2.1.0",
"graphql": "^15.7.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"reason-promise": "1.1.5",
"react": "18.3.1",
"react-dom": "18.3.1",
"rescript-apollo-client": "3.2.0",
"subscriptions-transport-ws": "0.11.0"
}
Expand Down
2 changes: 1 addition & 1 deletion EXAMPLES/src/Apollo.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let graphqlEndpoint = "localhost:4000"
let graphqlEndpoint = "localhost:4000/graphql"

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

Expand Down
8 changes: 7 additions & 1 deletion EXAMPLES/src/WebpackEntry.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
switch ReactDOM.querySelector("#root") {
| Some(el) => ReactDOM.Client.createRoot(el)->ReactDOM.Client.Root.render(<App />)
| Some(el) =>
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
el,
)
| None => ()
}
2 changes: 1 addition & 1 deletion EXAMPLES/src/clientUsage/ClientBasics.res
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let statsSubscription = Apollo.client.subscribe(
let make = () =>
<div>
<p>
<button onClick=logTodos> {"Log To-Dos (Reason Promise)"->React.string} </button>
<button onClick=logTodos> {"Log To-Dos"->React.string} </button>
</p>
<p>
<button onClick=addTodo> {"Add To-Do"->React.string} </button>
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"@apollo/client": "^3.5.0",
"@reasonml-community/graphql-ppx": "1.2.4-1345e061.0",
"@rescript/react": "~0.11.0",
"rescript": "~10.1.2",
"graphql": "^15.0.0",
"jest": "26.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rescript": "~10.1.2",
"subscriptions-transport-ws": "^0.9.17"
},
"peerDependencies": {
Expand All @@ -45,5 +45,9 @@
"bs-platform": {
"optional": true
}
}
},
"workspaces": [
"EXAMPLES",
"./"
]
}

0 comments on commit bdff923

Please sign in to comment.