rescript-relay 1.0.0-beta.10 → 1.0.0-beta.13
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 +20 -2
- package/README.md +6 -10
- package/cli/cli.js +29 -35
- package/package.json +4 -3
- package/postinstall.js +3 -0
- package/ppx-darwin +0 -0
- package/ppx-linux +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/src/RescriptRelay_Internal.bs.js +42 -13
- package/src/RescriptRelay_Internal.res +22 -18
- package/src/RescriptRelay_Internal.resi +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# master
|
|
2
2
|
|
|
3
|
-
# 1.0.0-beta.
|
|
3
|
+
# 1.0.0-beta.13
|
|
4
4
|
|
|
5
5
|
_[Here's a commit showing a project being upgraded to this version](https://github.com/zth/rescript-relay/commit/5831c2f1f0f13eedc1cb60468c32fd32b2dc01d3)_
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ The time has finally come - RescriptRelay `1.0.0` is in beta! The one, big major
|
|
|
8
8
|
|
|
9
9
|
## Upgrade versions
|
|
10
10
|
|
|
11
|
-
- `react-relay` and `relay-runtime` to `13.
|
|
11
|
+
- `react-relay` and `relay-runtime` to `13.1.1`
|
|
12
12
|
|
|
13
13
|
## Remove Packages
|
|
14
14
|
|
|
@@ -29,10 +29,28 @@ You can go ahead and remove these packages, that are no longer needed, as the co
|
|
|
29
29
|
- Improved utils for [dealing with enums](https://rescript-relay-documentation.vercel.app/docs/enums).
|
|
30
30
|
- `recordSourceRecords` is now typed as `Js.Json.t` rather than being abstract.
|
|
31
31
|
|
|
32
|
+
## Breaking changes
|
|
33
|
+
|
|
34
|
+
- `refetchVariables` now works as intended with regards to supplying only the variables you want _changed_ when refetching, as [detailed under `variables` here](https://relay.dev/docs/next/api-reference/use-refetchable-fragment/#return-value). This means that what was previously `makeRefetchVariables(~someValue=123, ())` should now be `makeRefetchVariables(~someValue=Some(123), ())`. More details on this in the docs before a `1.0.0` release. Thanks to [@tsnobip](https://github.com/tsnobip) for fixing this!
|
|
35
|
+
|
|
32
36
|
## Beta fix changelog
|
|
33
37
|
|
|
34
38
|
### unreleased
|
|
35
39
|
|
|
40
|
+
### beta.13
|
|
41
|
+
|
|
42
|
+
- `refetchVariables` now works as intended with regards to supplying only the variables you want _changed_ when refetching, as [detailed under `variables` here](https://relay.dev/docs/next/api-reference/use-refetchable-fragment/#return-value).
|
|
43
|
+
- Make all object makers inlined. This should improve bundle size some.
|
|
44
|
+
- Support more Linux versions in CI (like the images Vercel uses).
|
|
45
|
+
|
|
46
|
+
### beta.12
|
|
47
|
+
|
|
48
|
+
- Make CLI work with `relay.config.cjs`.
|
|
49
|
+
|
|
50
|
+
### beta.11
|
|
51
|
+
|
|
52
|
+
- Another batch of experimental stuff... Nothing new in this version compared to `beta.9`.
|
|
53
|
+
|
|
36
54
|
### beta.10
|
|
37
55
|
|
|
38
56
|
- Sneaking out some experimental stuff... Nothing new in this version compared to `beta.9`.
|
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@ Use Relay with ReScript.
|
|
|
6
6
|
|
|
7
7
|
## Getting started
|
|
8
8
|
|
|
9
|
-
> Are you using version `>= 0.13.0` and ReScript syntax with VSCode? Make sure you install our [
|
|
9
|
+
> Are you using version `>= 0.13.0` and ReScript syntax with VSCode? Make sure you install our [dedicated VSCode extension](https://marketplace.visualstudio.com/items?itemName=GabrielNordeborn.vscode-rescript-relay). Note: It only works with ReScript syntax.
|
|
10
10
|
|
|
11
11
|
Check out the [documentation](https://rescript-relay-documentation.vercel.app).
|
|
12
12
|
|
|
13
|
-
Also, check out the [changelog](CHANGELOG.md) - things will continue change
|
|
13
|
+
Also, check out the [changelog](CHANGELOG.md) - things will continue to change between versions (including breaking changes, although we'll try and keep them to a minimum) as we iterate and reach a stable version.
|
|
14
14
|
|
|
15
15
|
## What it looks like
|
|
16
16
|
|
|
@@ -18,15 +18,13 @@ Your components define what data they need through `%relay()`.
|
|
|
18
18
|
|
|
19
19
|
```rescript
|
|
20
20
|
/* Avatar.res */
|
|
21
|
-
module UserFragment = %relay(
|
|
22
|
-
`
|
|
21
|
+
module UserFragment = %relay(`
|
|
23
22
|
fragment Avatar_user on User {
|
|
24
23
|
firstName
|
|
25
24
|
lastName
|
|
26
25
|
avatarUrl
|
|
27
26
|
}
|
|
28
|
-
`
|
|
29
|
-
)
|
|
27
|
+
`)
|
|
30
28
|
|
|
31
29
|
@react.component
|
|
32
30
|
let make = (~user) => {
|
|
@@ -52,16 +50,14 @@ Hooks to use your fragments are autogenerated for you. The hook needs a _fragmen
|
|
|
52
50
|
|
|
53
51
|
```rescript
|
|
54
52
|
/* UserProfile.res */
|
|
55
|
-
module UserFragment = %relay(
|
|
56
|
-
`
|
|
53
|
+
module UserFragment = %relay(`
|
|
57
54
|
fragment UserProfile_user on User {
|
|
58
55
|
firstName
|
|
59
56
|
lastName
|
|
60
57
|
friendCount
|
|
61
58
|
...Avatar_user
|
|
62
59
|
}
|
|
63
|
-
`
|
|
64
|
-
)
|
|
60
|
+
`)
|
|
65
61
|
|
|
66
62
|
@react.component
|
|
67
63
|
let make = (~user) => {
|