Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: convert @obj and @deriving(abstract) to use optional record fields #154

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading