react-relay 0.0.0-main-11c5c4bb → 0.0.0-main-56b31d4d

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-11c5c4bb
2
+ * Relay v0.0.0-main-56b31d4d
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/hooks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-11c5c4bb
2
+ * Relay v0.0.0-main-56b31d4d
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-11c5c4bb
2
+ * Relay v0.0.0-main-56b31d4d
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/legacy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-11c5c4bb
2
+ * Relay v0.0.0-main-56b31d4d
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
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-11c5c4bb",
4
+ "version": "0.0.0-main-56b31d4d",
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-11c5c4bb"
23
+ "relay-runtime": "0.0.0-main-56b31d4d"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.9.0 || ^17 || ^18 || ^19"
@@ -37,6 +37,7 @@ export type PreloadOptions = {
37
37
  +fetchKey?: string | number,
38
38
  +fetchPolicy?: ?PreloadFetchPolicy,
39
39
  +includeIf?: ?boolean,
40
+ +enableForOfflineCacheJob?: ?boolean,
40
41
  +prefetchExpiryInHours?: ?number,
41
42
  +networkCacheConfig?: ?CacheConfig,
42
43
  };
@@ -142,6 +143,7 @@ export type InternalEntryPointRepresentation<
142
143
  TPreloadedEntryPoints = {...},
143
144
  TRuntimeProps = {...},
144
145
  TExtraProps = null,
146
+ +TRenders: React.Node = React.Node,
145
147
  > = $ReadOnly<{
146
148
  getPreloadProps: (
147
149
  entryPointParams: TEntryPointParams,
@@ -157,6 +159,7 @@ export type InternalEntryPointRepresentation<
157
159
  TPreloadedEntryPoints,
158
160
  TRuntimeProps,
159
161
  TExtraProps,
162
+ TRenders,
160
163
  >,
161
164
  >,
162
165
  }>;
@@ -180,7 +183,7 @@ export type EntryPointComponent<
180
183
  TPreloadedEntryPoints = {},
181
184
  TRuntimeProps = {},
182
185
  TExtraProps = null,
183
- TRenders: React.Node = React.Node,
186
+ +TRenders: React.Node = React.Node,
184
187
  > = component(
185
188
  ...EntryPointProps<
186
189
  TPreloadedQueries,
@@ -282,6 +285,11 @@ export type ExtractQueryTypes<
282
285
  >,
283
286
  };
284
287
 
288
+ // $FlowFixMe[unclear-type]: we don't care about the props
289
+ type Renders<+C: component(...any)> =
290
+ // $FlowFixMe[unclear-type]: we don't care about the props
291
+ C extends component(...any) renders infer R extends React.Node ? R : empty;
292
+
285
293
  export type EntryPoint<TEntryPointParams, +TEntryPointComponent> =
286
294
  InternalEntryPointRepresentation<
287
295
  TEntryPointParams,
@@ -289,6 +297,7 @@ export type EntryPoint<TEntryPointParams, +TEntryPointComponent> =
289
297
  ElementConfig<TEntryPointComponent>['entryPoints'],
290
298
  ElementConfig<TEntryPointComponent>['props'],
291
299
  ElementConfig<TEntryPointComponent>['extraProps'],
300
+ Renders<TEntryPointComponent>,
292
301
  >;
293
302
 
294
303
  export type PreloadParamsOf<T> = Parameters<T['getPreloadProps']>[0];