Skip to content

Commit

Permalink
refactor: convert @obj and @deriving(abstract) to use optional record…
Browse files Browse the repository at this point in the history
… fields

refactor: convert ApolloClient__Core_ApolloClient.res

refactor: QueryHookOptions

refactor: LazyQueryHookOptions

refactor: QueryLazyOptions

missed deprecation notices

more stuff

drop bs-platform support

bs-platform 9 -> rescript 9 has been around for quite some time now

more changes

DataProxy

the rest?

format again
  • Loading branch information
illusionalsagacity committed Oct 16, 2024
1 parent bdff923 commit ddd0e7f
Show file tree
Hide file tree
Showing 29 changed files with 867 additions and 928 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.re linguist-language=Reason
*.rei linguist-language=Reason
*.res linguist-language=ReScript
*.resi linguist-language=ReScript
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ yarn-error.log
.vscode/
lib/
node_modules/
.yarn/install-state.gz
4 changes: 0 additions & 4 deletions EXAMPLES/bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"version": 4,
"mode": "automatic"
},
"reason": {
"react-jsx": 3
},
"refmt": 3,
"sources": [
{
"dir": "src",
Expand Down
2 changes: 1 addition & 1 deletion EXAMPLES/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "rescript build -with-deps -w"
},
"devDependencies": {
"@reasonml-community/graphql-ppx": "1.2.3",
"@reasonml-community/graphql-ppx": "1.2.4-1345e061.0",
"graphql-client-example-server": "1.5.2",
"html-webpack-plugin": "5.5.0",
"rescript": "10.1.2",
Expand Down
4 changes: 0 additions & 4 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"in-source": true
}
],
"reason": {
"react-jsx": 3
},
"refmt": 3,
"jsx": {
"version": 4,
"mode": "automatic"
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,11 @@
"@apollo/client": "^3.5.0",
"@reasonml-community/graphql-ppx": "^1.0.0",
"@rescript/react": "~0.10. || ~0.11.0",
"bs-platform": "^8.2.0 || ^9.0.0",
"rescript": "^9.0.0 || ^10.0.0"
"rescript": "^10.0.0"
},
"peerDependenciesMeta": {
"rescript": {
"optional": true
},
"bs-platform": {
"optional": true
}
},
"workspaces": [
Expand Down
44 changes: 22 additions & 22 deletions src/@apollo/client/cache/core/ApolloClient__Cache_Core_Cache.res
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ module ApolloCache = {
~options={
id,
fragment: Fragment.query,
fragmentName,
optimistic,
canonizeResults,
?fragmentName,
?optimistic,
?canonizeResults,
},
~optimistic?,
(),
Expand Down Expand Up @@ -218,11 +218,11 @@ module ApolloCache = {
->Js_.readQuery(
~options=DataProxy.ReadQueryOptions.toJs(
{
id,
?id,
query: Operation.query,
variables,
optimistic,
canonizeResults,
?optimistic,
?canonizeResults,
},
~mapJsVariables,
~serializeVariables=Operation.serializeVariables,
Expand All @@ -247,12 +247,12 @@ module ApolloCache = {
js->Js_.writeFragment(
~options=DataProxy.WriteFragmentOptions.toJs(
{
broadcast,
?broadcast,
data,
id,
fragment: Fragment.query,
fragmentName,
overwrite,
?fragmentName,
?overwrite,
},
~serialize=Fragment.serialize,
),
Expand All @@ -275,12 +275,12 @@ module ApolloCache = {
js->Js_.writeQuery(
~options=DataProxy.WriteQueryOptions.toJs(
{
broadcast,
?broadcast,
data,
id,
?id,
query: Operation.query,
variables,
overwrite,
?overwrite,
},
~mapJsVariables,
~serialize=Operation.serialize,
Expand Down Expand Up @@ -310,13 +310,13 @@ module ApolloCache = {
->Js_.updateQuery(
~options=DataProxy.UpdateQueryOptions.toJs(
{
optimistic,
canonizeResults,
broadcast,
id,
?optimistic,
?canonizeResults,
?broadcast,
?id,
query: Operation.query,
variables,
overwrite,
?overwrite,
},
~mapJsVariables,
~serializeVariables=Operation.serializeVariables,
Expand Down Expand Up @@ -350,13 +350,13 @@ module ApolloCache = {
js
->Js_.updateFragment(
~options=DataProxy.UpdateFragmentOptions.toJs({
optimistic,
canonizeResults,
broadcast,
?optimistic,
?canonizeResults,
?broadcast,
id,
fragment: Fragment.query,
fragmentName,
overwrite,
?fragmentName,
?overwrite,
}),
~update=jsData =>
jsData
Expand Down
Loading

0 comments on commit ddd0e7f

Please sign in to comment.