rescript-relay 2.0.0-alpha.1 → 2.0.1
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 +16 -0
- package/package.json +1 -1
- 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-win-x64/relay.exe +0 -0
- package/src/RescriptRelay_Fragment.bs.js +2 -1
- package/src/RescriptRelay_Fragment.res +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# master
|
|
2
2
|
|
|
3
|
+
# 2.0.1
|
|
4
|
+
|
|
5
|
+
## Bug fix
|
|
6
|
+
|
|
7
|
+
- Proper import for `useBlockingPagination`. https://github.com/zth/rescript-relay/pull/459
|
|
8
|
+
|
|
9
|
+
# 2.0.0
|
|
10
|
+
|
|
11
|
+
RescriptRelay `2.0.0` is here! This isn't a large release really, but it's a major release just because it relies on functionality from ReScript `v11`. Meaning the lower bound of the required ReScript version is `>=11.0.0-beta.2`.
|
|
12
|
+
|
|
13
|
+
### Uncurried mode
|
|
14
|
+
|
|
15
|
+
`2.0.0` is built to work with uncurried mode. It's not fully _optimized_, that'll come in `3.0.0`, but it works well in uncurried mode.
|
|
16
|
+
|
|
17
|
+
You can activate uncurried mode with `RescriptRelay` by setting `"uncurried": true` (`true` is also the default in ReScript `>=11.0.0-beta.2`) in your `bsconfig.json`, and then ensuring that you pass `-uncurried` to `rescript-relay/ppx` in `ppx-flags`: `"ppx-flags": [["rescript-relay/ppx", "-uncurried"]]`.
|
|
18
|
+
|
|
3
19
|
# 2.0.0-alpha.1
|
|
4
20
|
|
|
5
21
|
## Improvements
|
package/package.json
CHANGED
package/ppx-windows-latest
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,6 +5,7 @@ var React = require("react");
|
|
|
5
5
|
var Caml_option = require("rescript/lib/js/caml_option.js");
|
|
6
6
|
var ReactRelay = require("react-relay");
|
|
7
7
|
var RescriptRelay_Internal = require("./RescriptRelay_Internal.bs.js");
|
|
8
|
+
var UseBlockingPaginationFragment = require("react-relay/lib/relay-hooks/useBlockingPaginationFragment").default;
|
|
8
9
|
|
|
9
10
|
function useFragment(node, convertFragment, fRef) {
|
|
10
11
|
var __x = ReactRelay.useFragment(node, fRef);
|
|
@@ -64,7 +65,7 @@ function usePaginationFragment(node, fRef, convertFragment, convertRefetchVariab
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
function useBlockingPaginationFragment(node, fRef, convertFragment, convertRefetchVariables) {
|
|
67
|
-
var p =
|
|
68
|
+
var p = UseBlockingPaginationFragment(node, fRef);
|
|
68
69
|
var data = RescriptRelay_Internal.internal_useConvertedValue(convertFragment, p.data);
|
|
69
70
|
return {
|
|
70
71
|
data: data,
|
|
@@ -154,11 +154,11 @@ let usePaginationFragment = (
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
@module("react-relay")
|
|
157
|
+
@module("react-relay/lib/relay-hooks/useBlockingPaginationFragment")
|
|
158
158
|
external useBlockingPaginationFragment_: (
|
|
159
159
|
fragmentNode<'node>,
|
|
160
160
|
'fragmentRef,
|
|
161
|
-
) => paginationFragmentReturnRaw<'fragment, 'refetchVariables> = "
|
|
161
|
+
) => paginationFragmentReturnRaw<'fragment, 'refetchVariables> = "default"
|
|
162
162
|
|
|
163
163
|
/** Like `Fragment.usePagination`, but calling the \
|
|
164
164
|
pagination function will trigger suspense. Useful for \
|