rescript-relay 0.0.0-pre-10692c05 → 0.0.0-pre-e1235447

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 CHANGED
@@ -1,5 +1,298 @@
1
1
  # master
2
2
 
3
+ # 1.1.0
4
+
5
+ Notable changes:
6
+
7
+ - _JSX v4 is now required_
8
+ - Relay and @rescript/react upgraded
9
+ - M1 support for the PPX (should speed up builds for anyone on an M1)
10
+
11
+ ## Upgrade versions
12
+
13
+ - `react-relay` and `relay-runtime` to `>=15.0.0`
14
+ - `@rescript/react` to `>=0.11.0`
15
+
16
+ ## Breaking changes
17
+
18
+ - The signature for missing field handlers has changed. Previously you got an open type `{..}` as record, now instead you get a proper `RecordProxy.t` from the store. Check out [the changelog for Relay 15](https://github.com/facebook/relay/releases/tag/v15.0.0).
19
+ - ReScript `>=10.1` and JSX v4 is now required.
20
+ - Work around issue with JSX v4 and `%relay.deferredComponent`. You now need to annotate any component you want to use with `%relay.deferredComponent` with `@relay.deferredComponent`. https://github.com/zth/rescript-relay/pull/439
21
+
22
+ ## Improvements
23
+
24
+ - Experimental support for allowing `null` in operation variables. Add `@rescriptRelayNullableVariables` to your operation (query, mutation, subscription) and you'll be allowed to pass `Js.null` (via the `Js.Null` module) to your server. https://github.com/zth/rescript-relay/pull/426
25
+ - :tada: M1 support for the PPX! This should speed up builds some. https://github.com/zth/rescript-relay/pull/435
26
+
27
+ ## Bug Fixes
28
+
29
+ - Fix issue with conversion of custom scalars, where custom scalars represented as arrays would get converted "internally" although they should've really just been left alone. https://github.com/zth/rescript-relay/pull/433
30
+
31
+ # 1.0.5
32
+
33
+ ## Bug Fixes
34
+
35
+ - Fix fairly large performance issue with runtime conversion. This should give a large speedup in certain cases.
36
+
37
+ # 1.0.4
38
+
39
+ ## Improvements
40
+
41
+ - Improved autocomplete for fragments etc (pulled from upstream Relay compiler). https://github.com/facebook/relay/pull/4134
42
+
43
+ # 1.0.3
44
+
45
+ ## Improvements
46
+
47
+ - Add `RescriptRelay.Disposable.ignore` for more ergonomic handling of ignoring disposables.
48
+
49
+ ## Bug Fixes
50
+
51
+ - Fix the `remove-unused-fields` script for CI with Node.js version >14 in [#409](https://github.com/zth/rescript-relay/pull/409)
52
+
53
+ # 1.0.2
54
+
55
+ ## Bug Fixes
56
+
57
+ - `private` is now correctly marked as a reserved word.
58
+
59
+ ## Improvements
60
+
61
+ - Add ReScript 10 compat in peerDependencies https://github.com/zth/rescript-relay/pull/397 @MoOx
62
+ - `makeConnectionId` helpers are now marked as `@live` to not trigger the dead code analysis.
63
+
64
+ # 1.0.1
65
+
66
+ ## Bug Fixes
67
+
68
+ - Fix issue with custom scalar of JSON values being accidentally mangled https://github.com/zth/rescript-relay/pull/395 @tsnobip
69
+
70
+ # 1.0.0
71
+
72
+ _[Here's a commit showing a project being upgraded to this version](https://github.com/zth/rescript-relay/commit/5831c2f1f0f13eedc1cb60468c32fd32b2dc01d3)_
73
+
74
+ The time has finally come - RescriptRelay `1.0.0` is released! This version brings a ton of new features and improvements. One of the the big major things this release brings is that the ReScript type generation for the Relay compiler has been completely rewritten, and fully integrated into the new Relay Rust compiler. The RescriptRelay fork of the compiler is available and maintained [here])(https://github.com/zth/relay/tree/rescript-relay).
75
+
76
+ ## Upgrade versions
77
+
78
+ - `react-relay` and `relay-runtime` to `>=14.1.0`
79
+ - `react` and `react-dom` to `>=18.0.0`
80
+
81
+ ## Remove Packages
82
+
83
+ You can go ahead and remove these packages, that are no longer needed, as the compiler is now shipped in the main package:
84
+
85
+ - `relay-config`
86
+ - `relay-compiler`
87
+ - `graphql` (if you don't use it for anything else)
88
+
89
+ ## Improvements
90
+
91
+ - The compiler itself should be _much_ faster than the old one. An order of magnitude faster. Especially for incremental compilation in watch mode.
92
+ - There's no longer any need to manually select `__typename` on interfaces and unions for RescriptRelay's sake, unless you actually want to use it yourself.
93
+ - We now support the `@required` directive from Relay, which is a new directive that lets you force non-nullability for nullable fields on the client side. You can then choose to throw an error if null values are encountered, or let the null value bubble up. Docs are coming soon.
94
+ - The errors reported by the compiler is now quite a lot better.
95
+ - Full support for `reanalyze` as all false positive dead code results from generated code are now suppressed.
96
+ - Bindings for `requiredFieldLogger` for logging when missing fields are encountered (kudos [Emilios1995](https://github.com/Emilios1995)).
97
+ - Improved utils for [dealing with enums](https://rescript-relay-documentation.vercel.app/docs/enums).
98
+ - `recordSourceRecords` is now typed as `Js.Json.t` rather than being abstract.
99
+ - Project now works in `"type": "module"` mode in `package.json` (kudos [cometkim](https://github.com/cometkim))
100
+ - The field name of the `id` field of the `Node` interface is now configurable via `schemaConfig: {nodeInterfaceIdField: "idNameHere"}`.
101
+ - Add support for experimental [Relay Resolvers](https://relay.dev/docs/next/guides/relay-resolvers). Undocumented so far, but looking at the [test](https://github.com/zth/rescript-relay/blob/master/packages/rescript-relay/__tests__/Test_relayResolvers.res) and [definition file](https://github.com/zth/rescript-relay/blob/master/packages/rescript-relay/__tests__/TestRelayUserResolver.res) should give you a hint of how it works.
102
+ - Support `@rescriptRelayIgnoreUnused` directive on fragment definitions to insert annotations that makes `reanalyze` consider all fields in the fragment used, even if they aren't.
103
+ - Support `@rescriptRelayAllowUnsafeEnum` directive on fields selecting enums, which will ignore safety measures for enums, meaning you won't need to add a catch all clause, etc. It'll essentially output the enum as an _input_ enum (as desribed in the docs).
104
+ - Support [provided variables](https://relay.dev/docs/api-reference/graphql-and-directives/#provided-variables). More info in the docs.
105
+ - Windows support! :tada:
106
+ - A `RelaySchemaAssets_graphql.res` is now emitted, containing type definitions for all enums and all input objects. This is designed to help with accessing and using enums and input objects outside of Relay's context. This means it'll be much easier to share makers for input objects, pass enums around, etc.
107
+ - Each fragment with a `@connection` now emits a `makeConnectionId` function that allows you to generate _type safe_ connection IDs. More on why this is useful in the documentation.
108
+
109
+ ## Breaking changes
110
+
111
+ - The list of disallowed field names has been adapted to ReScript (it was never properly updated for ReScript when moving from ReasonML). This means that _some of your variable prop names might be renamed_. One example - if you previously had a variable in GraphQL called `$to`, you'd interact with that as `to_` in ReScript. This is because RescriptRelay would pin `to` as a reserved word, and rename it for you. But, `to` _isn't_ actually a keyword in ReScript (it was in ReasonML), so with this release, that `to_` in ReScript will be renamed to `to`. The fix is to just update all `to_` to `to` - let the compiler guide you!
112
+ - Using variable names that are reserved words in ReScript is now _disallowed at the Relay compiler level_. This means that Relay won't compile your project if you have variables whose names are reserved words. The fix is to simply rename the variables.
113
+ - `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), ())`.
114
+ Crash course:
115
+
116
+ - `makeRefetchVariables(~someValue=Some(123), ())` means _refetch, use the same values for all variables that was used in the last fetch, but change `someValue` to `123`_.
117
+ - `makeRefetchVariables(~someValue=None, ())` means _refetch, use the same values for all variables that was used in the last fetch, but change `someValue` to `null` (unsetting it)_.
118
+ - `makeRefetchVariables()` means _refetch, use the same values for all variables that was used in the last fetch, change nothing_.
119
+
120
+ This way you can surgically change only certain values when refetching, without having to keep track of the current values for the other values.
121
+
122
+ More details on this [in the docs](https://rescript-relay-documentation.vercel.app/docs/refetching-and-loading-more-data#makerefetchvariables). Thanks to [@tsnobip](https://github.com/tsnobip) for fixing this!
123
+
124
+ - All enum type definitions now reside in `RelaySchemaAssets_graphql.enum_<yourEnumName>`, and are _not_ generated on the operation itself anymore. So, if you previously referred to the actual enum _type_, like `Fragment.Types.enum_MyFineEnum`, you'll now need to refer to that enum type as `RelaySchemaAssets_graphql.enum_MyFineEnum`.
125
+ - Input object fields with illegal names in ReScript previously had their maker function argument names suffixed with `_`, like `~type_: string`. This is now instead _prefixed_, like `~_type: string`. Prefixing like this instead of suffixing means we can ship fully zero cost maker functions, which we couldn't before for input objects with illegal field names.
126
+
127
+ ## Assorted Changes and Fixes
128
+
129
+ - Add Environment isServer option @MoOx
130
+ - Remove rescript from dependencies @anmonteiro
131
+ - Add undocumented holdGC method on relay store @MoOx
132
+ - Fixed `setLinkedRecordToNull`, `setLinkedRecordToUndefined`, `setLinkedRecordsToNull` and `setLinkedRecordsToUndefined` methods by binding them to `setValue` instead of `setLinkedRecord/s`. Previously they were throwing an error because `setLinkedRecord/s` did not support "deleting" values using them. (@reck753)
133
+ - Fix long standing bug that would make whether connection helpers were emitted or not unreliable.
134
+
135
+ ## 1.0.0 development changelog
136
+
137
+ - Fix bug in the new type safe connection ID makers where null default values wouldn't turn the variable into a `Js.Null.t<t>`, leading to type errors.
138
+ - Fix bug with connection handling where connections behind a `@include` or `@skip` directive would not be found.
139
+ - Move `getConnectionNodes` back into generated and auto included `Utils` module. This means that failing to generate `getConnectionNodes`, which can happen for various reasons, won't break the build, but rather not just emit the helper.
140
+
141
+ ### rc.5
142
+
143
+ - Fix compat with `rescript@10.1.0-alpha.1`.
144
+
145
+ ### rc.4
146
+
147
+ - _potentially breaking_ All enum type definitions now reside in `RelaySchemaAssets_graphql.enum_<yourEnumName>`, and are _not_ generated on the operation itself anymore. So, if you previously referred to the actual enum _type_, like `Fragment.Types.enum_MyFineEnum`, you'll now need to refer to that enum type as `RelaySchemaAssets_graphql.enum_MyFineEnum`.
148
+ - Fix bug in the new type safe connection ID makers where different types could end up in the same array, yielding type errors in ReScript.
149
+
150
+ ### rc.3
151
+
152
+ - Fix bug in the new type safe connection ID makers where constant value `null` couldn't be used.
153
+
154
+ ### rc.2
155
+
156
+ - Fix long standing bug that would make whether connection helpers were emitted or not unreliable.
157
+
158
+ ### rc.1
159
+
160
+ - Restore half-broken connection helper function inlining.
161
+
162
+ ### rc.0
163
+
164
+ - _potentially breaking_ `getConnectionNodes` and `connectionKey` is now located directly in the generated module, and not in a nested `Utils` module. `connectionKey` is also no longer exposed on the `Fragment` module, but only via the generated module for that fragment (`WhateverYourFragmentIsCalled_whatever_graphql.res`)
165
+ - Support [provided variables](https://relay.dev/docs/api-reference/graphql-and-directives/#provided-variables). More info in the docs.
166
+ - Windows support! :tada:
167
+ - Fixed `setLinkedRecordToNull`, `setLinkedRecordToUndefined`, `setLinkedRecordsToNull` and `setLinkedRecordsToUndefined` methods by binding them to `setValue` instead of `setLinkedRecord/s`. Previously they were throwing an error because `setLinkedRecord/s` did not support "deleting" values using them. (@reck753)
168
+ - A `RelaySchemaAssets_graphql.res` is now emitted, containing type definitions for all enums and all input objects. This is designed to help with accessing and using enums and input objects outside of Relay's context. This means it'll be much easier to share makers for input objects, pass enums around, etc.
169
+ - Each fragment with a `@connection` now emits a `makeConnectionId` function that allows you to generate _type safe_ connection IDs. More on why this is useful in the documentation.
170
+ - _breaking_ Input object fields with illegal names in ReScript previously had their maker function argument names suffixed with `_`, like `~type_: string`. This is now instead _prefixed_, like `~_type: string`. Prefixing like this instead of suffixing means we can ship fully zero cost maker functions, which we couldn't before for input objects with illegal field names.
171
+
172
+ ## beta.26
173
+
174
+ - Upgrade Relay packages to version `14.1.0`.
175
+
176
+ ## beta.25
177
+
178
+ - Change signature of preload function (router related).
179
+
180
+ ## beta.24
181
+
182
+ - Fix compatibility with ReScript v10
183
+
184
+ ## beta.23
185
+
186
+ - Add Environment isServer option @MoOx
187
+ - Fix incorrect react-relay peerDependencies version @MoOx
188
+ - Remove rescript from dependencies @anmonteiro
189
+ - Fix instantiation of Relay context @vikfroberg
190
+ - Add undocumented holdGC method on relay store @MoOx
191
+
192
+ ### beta.22
193
+
194
+ - Fix locations for `%relay.deferredComponent` so jump-to-definition, hover etc works as expected (pointing to the dynamically imported module rather than what the PPX produces).
195
+ - Add links for `Operation` module in `Query`, `Mutation`, `Subscription` and `Fragment` ([XiNiHa](https://github.com/XiNiHa))
196
+
197
+ ### beta.21
198
+
199
+ - Support formatting commented out operations in the CLI ([reck753](https://github.com/reck753)).
200
+ - Support `@rescriptRelayIgnoreUnused` directive on fragment definitions to insert annotations that makes `reanalyze` consider all fields in the fragment used, even if they aren't.
201
+ - Support `@rescriptRelayAllowUnsafeEnum` directive on fields selecting enums, which will ignore safety measures for enums, meaning you won't need to add a catch all clause, etc. It'll essentially output the enum as an _input_ enum (as desribed in the docs).
202
+
203
+ ### beta.20
204
+
205
+ - Fix enums appearing in `@raw_response_type` (local query updates, optimistic responses) to be input enums.
206
+
207
+ ### beta.19
208
+
209
+ - Fix top level node interface issue.
210
+
211
+ ### beta.18
212
+
213
+ - Fix `useTransition` bindings, where `startTransition` broke after going to React 18. Kudos to [Emilios1995](https://github.com/Emilios1995) for researching and finding the issue!
214
+
215
+ ### beta.17
216
+
217
+ - Upgrade to stable React 18
218
+
219
+ ### beta.16
220
+
221
+ - Fix bug that caused issues when using unions in optimistic responses and `commitLocalPayload`.
222
+ - Add support for experimental [Relay Resolvers](https://relay.dev/docs/next/guides/relay-resolvers). Undocumented so far, but looking at the [test](https://github.com/zth/rescript-relay/blob/master/packages/rescript-relay/__tests__/Test_relayResolvers.res) and [definition file](https://github.com/zth/rescript-relay/blob/master/packages/rescript-relay/__tests__/TestRelayUserResolver.res) should give you a hint of how it works.
223
+
224
+ ### beta.15
225
+
226
+ - Fixes for input objects.
227
+
228
+ ### beta.14
229
+
230
+ - Fixes a few issues introduced in `beta.13`.
231
+ - The list of disallowed field names has been adapted to ReScript. This means that _some of your variable prop names might be renamed_. Check out the Breaking Changes section above for details.
232
+
233
+ ### beta.13
234
+
235
+ - `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). Check out the [docs](https://rescript-relay-documentation.vercel.app/docs/refetching-and-loading-more-data#makerefetchvariables).
236
+ - Make all object makers inlined. This should improve bundle size some.
237
+ - Support more Linux versions in CI (like the images Vercel uses).
238
+
239
+ ### beta.12
240
+
241
+ - Make CLI work with `relay.config.cjs`.
242
+
243
+ ### beta.11
244
+
245
+ - Another batch of experimental stuff... Nothing new in this version compared to `beta.9`.
246
+
247
+ ### beta.10
248
+
249
+ - Sneaking out some experimental stuff... Nothing new in this version compared to `beta.9`.
250
+
251
+ ### beta.9
252
+
253
+ - `recordSourceRecords` is now typed as `Js.Json.t` rather than being abstract.
254
+ - The field name of the `id` field of the `Node` interface is now configurable via `schemaConfig: {nodeInterfaceIdField: "idNameHere"}`.
255
+
256
+ ### beta.8
257
+
258
+ - More fixes for conversion instructions in variables and input objects.
259
+ - Project now works in `"type": "module"` mode in `package.json` (kudos [cometkim](https://github.com/cometkim))
260
+
261
+ ### beta.7
262
+
263
+ - Full support for `reanalyze` as all false positive dead code results from generated code are now suppressed.
264
+ - Bindings for `requiredFieldLogger` for logging when missing fields are encountered (kudos [Emilios1995](https://github.com/Emilios1995)).
265
+ - Fix bug with conversion instructions in variables with input instructions.
266
+
267
+ ### beta.6
268
+
269
+ - Fix wrong enum type being printed in input objects
270
+ - Fix `__typename` not being automatically selected (and by that forcing a manual select) in some cases, even though it's not supposed to be required to select manually anymore
271
+
272
+ ### beta.5
273
+
274
+ - Generate helpers for moving between unsafe enums coming from the server, and safe enums. Also, provide a "fromString" function for each enum used, that can be used to turn any string into your enum.
275
+ - Suppress dead code warnings _in most places_ when running `reanalyze` on a `rescript-relay` code base. Still a few things left to fix, that requires changes to reanalyze. But this should be much better than before.
276
+
277
+ ### beta.4
278
+
279
+ - Revert JSON.parse micro optimization experiment.
280
+
281
+ ### beta.3
282
+
283
+ - Fix issue with duplicate keys being printed in the conversion instructions.
284
+ - Get rid of the need of nullability conversion instructions, and infer them instead.
285
+
286
+ ### beta.2
287
+
288
+ - Fix issue with recursive input objects not being converted correctly.
289
+
290
+ # 0.23.0
291
+
292
+ _[Here's a commit showing a project being upgraded to this version](https://github.com/zth/rescript-relay/commit/6e96dfafaec918b1d4e9519d3fcbf5e5c46be6c0)_
293
+
294
+ Finally, a new release! This brings the Relay version to 12, and the React version to 18 (in rc.1 at the time of writing). This release has a few breaking changes which are necessary as we're slowly approaching version 1.0.0 of RescriptRelay. Check the new "Migrations" section below for a few scripts you can run to help the migration.
295
+
3
296
  ## Upgrade versions
4
297
 
5
298
  - `react-relay` to `12.0.0`
@@ -12,12 +305,24 @@ React to React 18 rc:
12
305
  - `react` to `rc` (`yarn add react@rc`)
13
306
  - `react-dom` to `rc`(`yarn add react-dom@rc`)
14
307
 
308
+ ## Migrations
309
+
310
+ Want help migrating most of the changes in this release? Install [comby](https://comby.dev) and run the migrations below (paste them into your terminal at the root of your project). Comby will guide you through the proposed changes.
311
+
312
+ - `comby 'ReactExperimental.unstable_useDeferredValue(:[1])' 'ReactExperimental.useDeferredValue(:[1])' .res -matcher .re -exclude-dir node_modules -review`
313
+ - `comby 'ReactExperimental.renderConcurrentRootAtElementWithId' 'ReactDOMExperimental.renderConcurrentRootAtElementWithId' .res -matcher .re -exclude-dir node_modules -review`
314
+ - `comby 'let (:[1], :[2]) = ReactExperimental.unstable_useTransition()' 'let (:[2], :[1]) = ReactExperimental.useTransition()' .res -matcher .re -exclude-dir node_modules -review`
315
+
15
316
  ## Breaking changes
16
317
 
17
- - Remove `reason-promise`. We're waiting for the official new Promise bindings, but since they seem to be quite far away, we'll have to revert back to stock `Js.Promise` for now. This is because `reason-promise` clashes with other Promise bindings that people might want to use before the new official ones are actually shipped.
18
- - `ReactExperimental.unstable_useTransition` is now called `ReactExperimental.useTransition`, and the order of the tuple that's returned has been reversed to align with the underlying API. This means that what was before `let (startTransition, isTransitioning) = ReactExperimental.unstable_useTransition()` is now `let (isTransitioning, startTransition) = ReactExperimental.useTransition()`.
19
- - `ReactExperimental.unstable_useDeferredValue` is now called `ReactExperimental.useDeferredValue`.
20
- - `ReactExperimental.renderConcurrentRootAtElementWithId` has moved to `ReactDOMExperimental`: `ReactDOMExperimental.renderConcurrentRootAtElementWithId`.
318
+ - Remove `reason-promise` (unless you're using it for something else yourself and want to keep it). We're waiting for the official new Promise bindings, but since they seem to be quite far away, we'll have to revert back to stock `Js.Promise` for now. This is because `reason-promise` clashes with other Promise bindings that people might want to use before the new official ones are actually shipped.
319
+ - `ReactExperimental.unstable_useTransition` is now called `ReactExperimental.useTransition`, and the order of the tuple that's returned has been reversed to align with the underlying API. This means that what was before `let (startTransition, isTransitioning) = ReactExperimental.unstable_useTransition()` is now `let (isTransitioning, startTransition) = ReactExperimental.useTransition()` (migration available above).
320
+ - `ReactExperimental.unstable_useDeferredValue` is now called `ReactExperimental.useDeferredValue` (migration available above).
321
+ - `ReactExperimental.renderConcurrentRootAtElementWithId` has moved to `ReactDOMExperimental`: `ReactDOMExperimental.renderConcurrentRootAtElementWithId` (migration available above).
322
+
323
+ ## Fixes & misc
324
+
325
+ - You're now allowed to configure Relay via `package.json`.
21
326
 
22
327
  # 0.22.0
23
328
 
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 [decicated VSCode extension](https://marketplace.visualstudio.com/items?itemName=GabrielNordeborn.vscode-rescript-relay). Note: It only works with ReScript syntax.
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 some between versions (including breaking changes, although we'll try and keep them to a minimum) as we iterate and reach a stable version.
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) => {