relay-runtime 0.0.0-main-ff27db49 → 0.0.0-main-40e7b465

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/experimental.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-ff27db49
2
+ * Relay v0.0.0-main-40e7b465
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-ff27db49
2
+ * Relay v0.0.0-main-40e7b465
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -26,7 +26,7 @@ export interface INetwork {
26
26
 
27
27
  export type LogRequestInfoFunction = mixed => void;
28
28
 
29
- export type PayloadData = {[key: string]: mixed};
29
+ export type PayloadData = {+[key: string]: mixed};
30
30
 
31
31
  export type PayloadError = interface {
32
32
  message: string,
@@ -134,4 +134,4 @@ export type SubscribeFunction = (
134
134
  ) => RelayObservable<GraphQLResponse>;
135
135
 
136
136
  export type Uploadable = File | Blob;
137
- export type UploadableMap = {[key: string]: Uploadable};
137
+ export type UploadableMap = {+[key: string]: Uploadable};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relay-runtime",
3
3
  "description": "A core runtime for building GraphQL-driven applications.",
4
- "version": "0.0.0-main-ff27db49",
4
+ "version": "0.0.0-main-40e7b465",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"
@@ -86,7 +86,7 @@ class RelayRecordSource implements MutableRecordSource {
86
86
  }
87
87
 
88
88
  toJSON(): RecordSourceJSON {
89
- const obj: RecordSourceJSON = {};
89
+ const obj: {...RecordSourceJSON} = {};
90
90
  for (const [key, record] of this._records) {
91
91
  obj[key] = RelayModernRecord.toJSON<null | void>(record);
92
92
  }
@@ -67,7 +67,7 @@ const invariant = require('invariant');
67
67
  const warning = require('warning');
68
68
 
69
69
  export type GetDataID = (
70
- fieldValue: {[string]: mixed},
70
+ fieldValue: {+[string]: mixed},
71
71
  typeName: string,
72
72
  ) => mixed;
73
73
 
@@ -245,7 +245,7 @@ export interface RecordSource {
245
245
  /**
246
246
  * A collection of records keyed by id.
247
247
  */
248
- export type RecordSourceJSON = {[DataID]: ?RecordJSON};
248
+ export type RecordSourceJSON = {+[DataID]: ?RecordJSON};
249
249
 
250
250
  /**
251
251
  * A read/write interface for accessing and updating graph data.
@@ -258,10 +258,10 @@ export interface MutableRecordSource extends RecordSource {
258
258
  }
259
259
 
260
260
  export type CheckOptions = {
261
- handlers: $ReadOnlyArray<MissingFieldHandler>,
262
- defaultActorIdentifier: ActorIdentifier,
263
- getTargetForActor: (actorIdentifier: ActorIdentifier) => MutableRecordSource,
264
- getSourceForActor: (actorIdentifier: ActorIdentifier) => RecordSource,
261
+ +handlers: $ReadOnlyArray<MissingFieldHandler>,
262
+ +defaultActorIdentifier: ActorIdentifier,
263
+ +getTargetForActor: (actorIdentifier: ActorIdentifier) => MutableRecordSource,
264
+ +getSourceForActor: (actorIdentifier: ActorIdentifier) => RecordSource,
265
265
  };
266
266
 
267
267
  export type OperationAvailability =
@@ -14,7 +14,7 @@
14
14
  const {VIEWER_ID, VIEWER_TYPE} = require('./ViewerPattern');
15
15
 
16
16
  function defaultGetDataID(
17
- fieldValue: {[string]: mixed},
17
+ fieldValue: {+[string]: mixed},
18
18
  typeName: string,
19
19
  ): mixed {
20
20
  if (typeName === VIEWER_TYPE) {
@@ -62,14 +62,14 @@ export type VariablesOf<T: OperationType> = T['variables'];
62
62
  * a given instance of executing an operation.
63
63
  */
64
64
  export type CacheConfig = {
65
- force?: ?boolean,
66
- poll?: ?number,
67
- liveConfigId?: ?string,
68
- onSubscribe?: () => void,
69
- onResume?: (pauseTimeMs: number) => void,
70
- onPause?: (mqttConnectionIsOk: boolean, internetIsOk: boolean) => void,
71
- metadata?: {[key: string]: mixed, ...},
72
- transactionId?: ?string,
65
+ +force?: ?boolean,
66
+ +poll?: ?number,
67
+ +liveConfigId?: ?string,
68
+ +onSubscribe?: () => void,
69
+ +onResume?: (pauseTimeMs: number) => void,
70
+ +onPause?: (mqttConnectionIsOk: boolean, internetIsOk: boolean) => void,
71
+ +metadata?: {+[key: string]: mixed, ...},
72
+ +transactionId?: ?string,
73
73
  };
74
74
 
75
75
  export type FetchQueryFetchPolicy = 'store-or-network' | 'network-only';