react-relay 20.1.0 → 20.1.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/ReactRelayContext.js +1 -1
- package/ReactRelayFragmentContainer.js.flow +1 -1
- package/ReactRelayPaginationContainer.js.flow +1 -1
- package/ReactRelayRefetchContainer.js.flow +1 -1
- package/getRootVariablesForFragments.js.flow +2 -2
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/legacy.js +1 -1
- package/package.json +2 -2
- package/relay-hooks/getConnectionState.js.flow +2 -2
- package/relay-hooks/loadEntryPoint.js.flow +1 -1
package/ReactRelayContext.js
CHANGED
@@ -347,7 +347,7 @@ function createContainerWithFragments<
|
|
347
347
|
connectionConfig.getFragmentVariables ||
|
348
348
|
createGetFragmentVariables(metadata);
|
349
349
|
|
350
|
-
return class extends React.Component<$
|
350
|
+
return class extends React.Component<$FlowFixMe, ContainerState> {
|
351
351
|
// $FlowFixMe[missing-local-annot]
|
352
352
|
static displayName = containerName;
|
353
353
|
|
@@ -30,8 +30,8 @@ function getRootVariablesForFragments<TProps: {...}>(
|
|
30
30
|
const selector = getSelector(fragmentNode, fragmentRef);
|
31
31
|
const fragmentOwnerVariables =
|
32
32
|
selector != null && selector.kind === 'PluralReaderSelector'
|
33
|
-
? selector.selectors[0]?.owner.variables ?? {}
|
34
|
-
: selector?.owner.variables ?? {};
|
33
|
+
? (selector.selectors[0]?.owner.variables ?? {})
|
34
|
+
: (selector?.owner.variables ?? {});
|
35
35
|
/* $FlowFixMe[incompatible-indexer] Natural Inference rollout. See
|
36
36
|
* https://fburl.com/gdoc/y8dn025u */
|
37
37
|
rootVariables = {
|
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": "20.1.
|
4
|
+
"version": "20.1.1",
|
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": "20.1.
|
23
|
+
"relay-runtime": "20.1.1"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
26
|
"react": "^16.9.0 || ^17 || ^18 || ^19"
|
@@ -73,8 +73,8 @@ function getConnectionState(
|
|
73
73
|
|
74
74
|
const cursor =
|
75
75
|
direction === 'forward'
|
76
|
-
? pageInfo[END_CURSOR] ?? null
|
77
|
-
: pageInfo[START_CURSOR] ?? null;
|
76
|
+
? (pageInfo[END_CURSOR] ?? null)
|
77
|
+
: (pageInfo[START_CURSOR] ?? null);
|
78
78
|
invariant(
|
79
79
|
cursor === null || typeof cursor === 'string',
|
80
80
|
'Relay: Expected page info for connection in fragment `%s` to have a ' +
|
@@ -144,7 +144,7 @@ function loadEntryPoint<
|
|
144
144
|
// that it's actually an es6 module wrapper, so unwrap it. This won't work for React classes with a static property named "default", but
|
145
145
|
// that's probably a worthwhile trade-off.
|
146
146
|
const component =
|
147
|
-
// $
|
147
|
+
// $FlowFixMe[prop-missing]
|
148
148
|
componentModule.default != null
|
149
149
|
? componentModule.default
|
150
150
|
: componentModule;
|