react-relay 0.0.0-main-ab5094ec → 0.0.0-main-5cac162b
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/ReactRelayContext.js +1 -1
- package/ReactRelayFragmentContainer.js.flow +1 -2
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/legacy.js +1 -1
- package/package.json +2 -2
- package/relay-hooks/rsc/serverPreloadQuery.js.flow +5 -4
- package/rsc-client_EXPERIMENTAL.js +1 -1
- package/rsc_EXPERIMENTAL.js +1 -1
package/ReactRelayContext.js
CHANGED
|
@@ -234,8 +234,7 @@ function createContainerWithFragments<
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
render() {
|
|
237
|
+
render(): React.Node {
|
|
239
238
|
// eslint-disable-next-line no-unused-vars
|
|
240
239
|
const {componentRef, __relayContext, __rootIsQueryRenderer, ...props} =
|
|
241
240
|
this.props;
|
package/hooks.js
CHANGED
package/index.js
CHANGED
package/legacy.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-relay",
|
|
3
3
|
"description": "A framework for building GraphQL-driven React applications.",
|
|
4
|
-
"version": "0.0.0-main-
|
|
4
|
+
"version": "0.0.0-main-5cac162b",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
7
7
|
"relay",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"fbjs": "^3.0.2",
|
|
21
21
|
"invariant": "^2.2.4",
|
|
22
22
|
"nullthrows": "^1.1.1",
|
|
23
|
-
"relay-runtime": "0.0.0-main-
|
|
23
|
+
"relay-runtime": "0.0.0-main-5cac162b"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.9.0 || ^17 || ^18 || ^19"
|
|
@@ -42,9 +42,9 @@ function serverPreloadQuery<TVariables extends Variables, TData>(
|
|
|
42
42
|
const queryId =
|
|
43
43
|
request.params.id ?? request.params.cacheID ?? request.params.name;
|
|
44
44
|
|
|
45
|
-
const response: Promise<PreloadedQueryResponse<TData>> =
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const response: Promise<PreloadedQueryResponse<TData>> = observable
|
|
46
|
+
.toPromise()
|
|
47
|
+
.then(rawResponse => {
|
|
48
48
|
invariant(rawResponse != null, 'Unexpected null response from execute');
|
|
49
49
|
// TODO: @defer returns batched responses; this only handles the first payload
|
|
50
50
|
invariant(
|
|
@@ -52,7 +52,8 @@ function serverPreloadQuery<TVariables extends Variables, TData>(
|
|
|
52
52
|
'@defer is not yet supported in serverPreloadQuery',
|
|
53
53
|
);
|
|
54
54
|
return {
|
|
55
|
-
|
|
55
|
+
// $FlowFixMe[incompatible-type] PayloadData -> TData; shape validated by the Relay compiler
|
|
56
|
+
data: rawResponse.data as TData,
|
|
56
57
|
errors: rawResponse.errors,
|
|
57
58
|
};
|
|
58
59
|
});
|
package/rsc_EXPERIMENTAL.js
CHANGED