rescript-relay 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +5 -5
- package/ppx-windows-latest +0 -0
- package/relay-compiler-linux-musl/relay +0 -0
- package/relay-compiler-linux-x64/relay +0 -0
- package/relay-compiler-macos-arm64/relay +0 -0
- package/relay-compiler-macos-x64/relay +0 -0
- package/relay-compiler-win-x64/relay.exe +0 -0
- package/src/RescriptRelay.res +15 -2
- package/src/RescriptRelay.resi +15 -2
- package/src/RescriptRelay_Fragment.bs.js +1 -1
- package/src/RescriptRelay_Fragment.res +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# master
|
|
2
2
|
|
|
3
|
+
# 3.5.0
|
|
4
|
+
|
|
5
|
+
- Move underlying Relay compiler version to `20.1.1`.
|
|
6
|
+
|
|
7
|
+
## Upgrade versions
|
|
8
|
+
|
|
9
|
+
- `react-relay` and `relay-runtime` to `20.1.1`
|
|
10
|
+
|
|
3
11
|
# 3.4.0
|
|
4
12
|
|
|
5
13
|
- Add support for `@exhaustive` - a directive to trigger exhaustiveness checks for unions at the GraphQL operation level.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rescript-relay",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"main": "src/RescriptRelay.res",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Gabriel Nordeborn",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"node-fetch": "^2.6.0",
|
|
50
50
|
"react": "18.2.0",
|
|
51
51
|
"react-dom": "18.2.0",
|
|
52
|
-
"react-relay": "
|
|
53
|
-
"relay-runtime": "
|
|
52
|
+
"react-relay": "20.1.1",
|
|
53
|
+
"relay-runtime": "20.1.1",
|
|
54
54
|
"rescript": "11.1.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@rescript/react": ">=0.13.0",
|
|
58
|
-
"react-relay": "
|
|
59
|
-
"relay-runtime": "
|
|
58
|
+
"react-relay": "20.1.1",
|
|
59
|
+
"relay-runtime": "20.1.1",
|
|
60
60
|
"rescript": "^11.0.0"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
package/ppx-windows-latest
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/RescriptRelay.res
CHANGED
|
@@ -705,24 +705,37 @@ module Store = {
|
|
|
705
705
|
module RelayFieldLogger = {
|
|
706
706
|
@tag("kind")
|
|
707
707
|
type arg =
|
|
708
|
-
| @as("missing_required_field.log")
|
|
708
|
+
| @as("missing_required_field.log")
|
|
709
|
+
MissingRequiredFieldLog({
|
|
710
|
+
owner: string,
|
|
711
|
+
fieldPath: string,
|
|
712
|
+
uiContext: option<Js.Json.t>,
|
|
713
|
+
})
|
|
709
714
|
| @as("missing_required_field.throw")
|
|
710
715
|
MissingRequiredFieldThrow({
|
|
711
716
|
owner: string,
|
|
712
717
|
fieldPath: string,
|
|
718
|
+
uiContext: option<Js.Json.t>,
|
|
719
|
+
})
|
|
720
|
+
| @as("missing_expected_data.log")
|
|
721
|
+
MissingExpectedData({
|
|
722
|
+
owner: string,
|
|
723
|
+
fieldPath: string,
|
|
724
|
+
uiContext: option<Js.Json.t>,
|
|
713
725
|
})
|
|
714
|
-
| @as("missing_expected_data.log") MissingExpectedData({owner: string, fieldPath: string})
|
|
715
726
|
| @as("missing_expected_data.throw")
|
|
716
727
|
MissingExpectedDataThrow({
|
|
717
728
|
owner: string,
|
|
718
729
|
fieldPath: string,
|
|
719
730
|
handled: bool,
|
|
731
|
+
uiContext: option<Js.Json.t>,
|
|
720
732
|
})
|
|
721
733
|
| @as("relay_resolver.error")
|
|
722
734
|
RelayResolverError({
|
|
723
735
|
owner: string,
|
|
724
736
|
fieldPath: string,
|
|
725
737
|
error: Js.Exn.t,
|
|
738
|
+
uiContext: option<Js.Json.t>,
|
|
726
739
|
})
|
|
727
740
|
|
|
728
741
|
type t = arg => unit
|
package/src/RescriptRelay.resi
CHANGED
|
@@ -1331,24 +1331,37 @@ module Disposable: {
|
|
|
1331
1331
|
module RelayFieldLogger: {
|
|
1332
1332
|
@tag("kind")
|
|
1333
1333
|
type arg =
|
|
1334
|
-
| @as("missing_required_field.log")
|
|
1334
|
+
| @as("missing_required_field.log")
|
|
1335
|
+
MissingRequiredFieldLog({
|
|
1336
|
+
owner: string,
|
|
1337
|
+
fieldPath: string,
|
|
1338
|
+
uiContext: option<Js.Json.t>,
|
|
1339
|
+
})
|
|
1335
1340
|
| @as("missing_required_field.throw")
|
|
1336
1341
|
MissingRequiredFieldThrow({
|
|
1337
1342
|
owner: string,
|
|
1338
1343
|
fieldPath: string,
|
|
1344
|
+
uiContext: option<Js.Json.t>,
|
|
1345
|
+
})
|
|
1346
|
+
| @as("missing_expected_data.log")
|
|
1347
|
+
MissingExpectedData({
|
|
1348
|
+
owner: string,
|
|
1349
|
+
fieldPath: string,
|
|
1350
|
+
uiContext: option<Js.Json.t>,
|
|
1339
1351
|
})
|
|
1340
|
-
| @as("missing_expected_data.log") MissingExpectedData({owner: string, fieldPath: string})
|
|
1341
1352
|
| @as("missing_expected_data.throw")
|
|
1342
1353
|
MissingExpectedDataThrow({
|
|
1343
1354
|
owner: string,
|
|
1344
1355
|
fieldPath: string,
|
|
1345
1356
|
handled: bool,
|
|
1357
|
+
uiContext: option<Js.Json.t>,
|
|
1346
1358
|
})
|
|
1347
1359
|
| @as("relay_resolver.error")
|
|
1348
1360
|
RelayResolverError({
|
|
1349
1361
|
owner: string,
|
|
1350
1362
|
fieldPath: string,
|
|
1351
1363
|
error: Js.Exn.t,
|
|
1364
|
+
uiContext: option<Js.Json.t>,
|
|
1352
1365
|
})
|
|
1353
1366
|
|
|
1354
1367
|
/**A required field logger, which gets called when a field annotated with the @required directive was missing from the response*/
|
|
@@ -70,7 +70,7 @@ function usePaginationFragment(node, fRef, convertFragment, convertRefetchVariab
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function usePrefetchableForwardPagination(node, fRef, convertEdges, convertFragment, convertRefetchVariables, bufferSize, initialSize, prefetchingLoadMoreOptions, minimumFetchSize) {
|
|
73
|
-
var p = ReactRelay.
|
|
73
|
+
var p = ReactRelay.usePrefetchableForwardPaginationFragment(node, fRef, bufferSize, initialSize !== undefined ? Caml_option.valFromOption(initialSize) : undefined, prefetchingLoadMoreOptions !== undefined ? Caml_option.valFromOption(prefetchingLoadMoreOptions) : undefined, minimumFetchSize !== undefined ? Caml_option.valFromOption(minimumFetchSize) : undefined);
|
|
74
74
|
var data = RescriptRelay_Internal.internal_useConvertedValue(convertFragment, p.data);
|
|
75
75
|
var edges = RescriptRelay_Internal.internal_useConvertedValue(convertEdges, p.edges);
|
|
76
76
|
return {
|
|
@@ -173,7 +173,7 @@ external usePrefetchableForwardPaginationFragment_: (
|
|
|
173
173
|
~prefetchingLoadMoreOptions: paginationLoadMoreOptions=?,
|
|
174
174
|
~minimumFetchSize: int=?,
|
|
175
175
|
) => prefetchableForwardPaginationFragmentReturnRaw<'fragment, 'edges, 'refetchVariables> =
|
|
176
|
-
"
|
|
176
|
+
"usePrefetchableForwardPaginationFragment"
|
|
177
177
|
|
|
178
178
|
/** React hook for paginating a fragment. Paginating with this hook will _not_ cause your component to suspend. */
|
|
179
179
|
let usePrefetchableForwardPagination = (
|