relay-runtime 0.0.0-main-e0f88a3b → 0.0.0-main-2087b512
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/handlers/RelayDefaultHandlerProvider.js.flow +2 -3
- package/handlers/connection/ConnectionHandler.js.flow +8 -10
- package/handlers/connection/MutationHandlers.js.flow +7 -8
- package/index.js +1 -1
- package/index.js.flow +29 -31
- package/lib/handlers/connection/ConnectionHandler.js +7 -7
- package/lib/index.js +45 -45
- package/lib/multi-actor-environment/ActorSpecificEnvironment.js +4 -4
- package/lib/multi-actor-environment/MultiActorEnvironment.js +8 -8
- package/lib/multi-actor-environment/index.js +2 -2
- package/lib/mutations/RelayRecordProxy.js +3 -2
- package/lib/mutations/RelayRecordSourceMutator.js +3 -2
- package/lib/mutations/RelayRecordSourceProxy.js +5 -4
- package/lib/mutations/RelayRecordSourceSelectorProxy.js +5 -4
- package/lib/mutations/applyOptimisticMutation.js +6 -6
- package/lib/mutations/commitMutation.js +10 -10
- package/lib/mutations/validateMutation.js +6 -6
- package/lib/network/ConvertToExecuteFunction.js +2 -1
- package/lib/network/RelayNetwork.js +3 -2
- package/lib/network/RelayQueryResponseCache.js +2 -2
- package/lib/network/wrapNetworkWithLogObserver.js +2 -1
- package/lib/query/GraphQLTag.js +2 -1
- package/lib/query/fetchQuery.js +6 -5
- package/lib/query/fetchQuery_DEPRECATED.js +2 -1
- package/lib/store/ClientID.js +4 -4
- package/lib/store/DataChecker.js +15 -15
- package/lib/store/OperationExecutor.js +13 -13
- package/lib/store/RelayConcreteVariables.js +3 -2
- package/lib/store/RelayModernEnvironment.js +11 -11
- package/lib/store/RelayModernFragmentSpecResolver.js +8 -8
- package/lib/store/RelayModernOperationDescriptor.js +2 -1
- package/lib/store/RelayModernRecord.js +12 -11
- package/lib/store/RelayModernSelector.js +7 -6
- package/lib/store/RelayModernStore.js +13 -13
- package/lib/store/RelayPublishQueue.js +4 -4
- package/lib/store/RelayReader.js +12 -12
- package/lib/store/RelayReferenceMarker.js +9 -9
- package/lib/store/RelayResponseNormalizer.js +19 -19
- package/lib/store/RelayStoreReactFlightUtils.js +3 -3
- package/lib/store/RelayStoreSubscriptions.js +4 -4
- package/lib/store/RelayStoreUtils.js +3 -3
- package/lib/store/ResolverCache.js +6 -6
- package/lib/store/ResolverFragments.js +6 -2
- package/lib/store/cloneRelayHandleSourceField.js +5 -4
- package/lib/store/cloneRelayScalarHandleSourceField.js +5 -4
- package/lib/store/createRelayContext.js +3 -1
- package/lib/store/readInlineData.js +6 -2
- package/lib/subscription/requestSubscription.js +4 -4
- package/lib/util/RelayFeatureFlags.js +1 -0
- package/lib/util/StringInterner.js +57 -0
- package/lib/util/getFragmentIdentifier.js +10 -10
- package/lib/util/getOperation.js +2 -1
- package/lib/util/getRelayHandleKey.js +2 -2
- package/lib/util/getRequestIdentifier.js +2 -2
- package/multi-actor-environment/ActorSpecificEnvironment.js.flow +14 -15
- package/multi-actor-environment/ActorUtils.js.flow +2 -2
- package/multi-actor-environment/MultiActorEnvironment.js.flow +9 -10
- package/multi-actor-environment/MultiActorEnvironmentTypes.js.flow +4 -4
- package/multi-actor-environment/index.js.flow +1 -2
- package/mutations/RelayDeclarativeMutationConfig.js.flow +3 -4
- package/mutations/RelayRecordProxy.js.flow +4 -5
- package/mutations/RelayRecordSourceMutator.js.flow +4 -6
- package/mutations/RelayRecordSourceProxy.js.flow +7 -9
- package/mutations/RelayRecordSourceSelectorProxy.js.flow +3 -4
- package/mutations/applyOptimisticMutation.js.flow +8 -10
- package/mutations/commitLocalUpdate.js.flow +1 -1
- package/mutations/commitMutation.js.flow +12 -19
- package/mutations/validateMutation.js.flow +14 -16
- package/network/ConvertToExecuteFunction.js.flow +2 -2
- package/network/RelayNetwork.js.flow +4 -5
- package/network/RelayQueryResponseCache.js.flow +3 -3
- package/network/wrapNetworkWithLogObserver.js.flow +3 -3
- package/package.json +1 -1
- package/query/GraphQLTag.js.flow +6 -7
- package/query/fetchQuery.js.flow +9 -11
- package/query/fetchQueryInternal.js.flow +4 -5
- package/query/fetchQuery_DEPRECATED.js.flow +4 -4
- package/relay-runtime.js +2 -2
- package/relay-runtime.min.js +2 -2
- package/store/ClientID.js.flow +8 -6
- package/store/DataChecker.js.flow +16 -18
- package/store/OperationExecutor.js.flow +24 -26
- package/store/RelayConcreteVariables.js.flow +4 -5
- package/store/RelayModernEnvironment.js.flow +17 -19
- package/store/RelayModernFragmentSpecResolver.js.flow +16 -18
- package/store/RelayModernOperationDescriptor.js.flow +10 -11
- package/store/RelayModernRecord.js.flow +19 -12
- package/store/RelayModernSelector.js.flow +11 -12
- package/store/RelayModernStore.js.flow +21 -23
- package/store/RelayOperationTracker.js.flow +2 -2
- package/store/RelayOptimisticRecordSource.js.flow +2 -2
- package/store/RelayPublishQueue.js.flow +8 -9
- package/store/RelayReader.js.flow +33 -35
- package/store/RelayRecordSource.js.flow +2 -2
- package/store/RelayReferenceMarker.js.flow +12 -14
- package/store/RelayResponseNormalizer.js.flow +36 -38
- package/store/RelayStoreReactFlightUtils.js.flow +3 -4
- package/store/RelayStoreSubscriptions.js.flow +7 -8
- package/store/RelayStoreTypes.js.flow +9 -3
- package/store/RelayStoreUtils.js.flow +7 -8
- package/store/ResolverCache.js.flow +11 -13
- package/store/ResolverFragments.js.flow +4 -5
- package/store/ViewerPattern.js.flow +2 -2
- package/store/cloneRelayHandleSourceField.js.flow +5 -6
- package/store/cloneRelayScalarHandleSourceField.js.flow +5 -6
- package/store/createFragmentSpecResolver.js.flow +3 -4
- package/store/createRelayContext.js.flow +2 -2
- package/store/normalizeRelayPayload.js.flow +6 -7
- package/store/readInlineData.js.flow +3 -4
- package/subscription/requestSubscription.js.flow +9 -11
- package/util/RelayFeatureFlags.js.flow +2 -0
- package/util/RelayReplaySubject.js.flow +2 -3
- package/util/StringInterner.js.flow +57 -0
- package/util/createPayloadFor3DField.js.flow +3 -3
- package/util/getFragmentIdentifier.js.flow +14 -10
- package/util/getOperation.js.flow +2 -2
- package/util/getPaginationMetadata.js.flow +3 -3
- package/util/getPaginationVariables.js.flow +3 -3
- package/util/getPendingOperationsForFragment.js.flow +2 -2
- package/util/getRefetchMetadata.js.flow +2 -2
- package/util/getRelayHandleKey.js.flow +1 -2
- package/util/getRequestIdentifier.js.flow +3 -3
- package/lib/util/shortString.js +0 -63
- package/util/shortString.js.flow +0 -62
|
@@ -12,12 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayModernRecord = require('../store/RelayModernRecord');
|
|
16
|
-
|
|
17
|
-
const invariant = require('invariant');
|
|
18
|
-
|
|
19
|
-
const {EXISTENT} = require('../store/RelayRecordState');
|
|
20
|
-
|
|
21
15
|
import type {RecordState} from '../store/RelayRecordState';
|
|
22
16
|
import type {
|
|
23
17
|
MutableRecordSource,
|
|
@@ -26,6 +20,10 @@ import type {
|
|
|
26
20
|
} from '../store/RelayStoreTypes';
|
|
27
21
|
import type {DataID} from '../util/RelayRuntimeTypes';
|
|
28
22
|
|
|
23
|
+
const RelayModernRecord = require('../store/RelayModernRecord');
|
|
24
|
+
const {EXISTENT} = require('../store/RelayRecordState');
|
|
25
|
+
const invariant = require('invariant');
|
|
26
|
+
|
|
29
27
|
/**
|
|
30
28
|
* @internal
|
|
31
29
|
*
|
|
@@ -12,26 +12,24 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayModernRecord = require('../store/RelayModernRecord');
|
|
16
|
-
const RelayRecordProxy = require('./RelayRecordProxy');
|
|
17
|
-
|
|
18
|
-
const invariant = require('invariant');
|
|
19
|
-
|
|
20
|
-
const {EXISTENT, NONEXISTENT} = require('../store/RelayRecordState');
|
|
21
|
-
const {ROOT_ID, ROOT_TYPE} = require('../store/RelayStoreUtils');
|
|
22
|
-
|
|
23
15
|
import type {HandlerProvider} from '../handlers/RelayDefaultHandlerProvider';
|
|
24
16
|
import type {GetDataID} from '../store/RelayResponseNormalizer';
|
|
25
17
|
import type {
|
|
26
18
|
DataIDSet,
|
|
27
19
|
HandleFieldPayload,
|
|
28
|
-
RecordSource,
|
|
29
20
|
RecordProxy,
|
|
21
|
+
RecordSource,
|
|
30
22
|
RecordSourceProxy,
|
|
31
23
|
} from '../store/RelayStoreTypes';
|
|
32
24
|
import type {DataID} from '../util/RelayRuntimeTypes';
|
|
33
25
|
import type RelayRecordSourceMutator from './RelayRecordSourceMutator';
|
|
34
26
|
|
|
27
|
+
const RelayModernRecord = require('../store/RelayModernRecord');
|
|
28
|
+
const {EXISTENT, NONEXISTENT} = require('../store/RelayRecordState');
|
|
29
|
+
const {ROOT_ID, ROOT_TYPE} = require('../store/RelayStoreUtils');
|
|
30
|
+
const RelayRecordProxy = require('./RelayRecordProxy');
|
|
31
|
+
const invariant = require('invariant');
|
|
32
|
+
|
|
35
33
|
/**
|
|
36
34
|
* @internal
|
|
37
35
|
*
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const invariant = require('invariant');
|
|
16
|
-
|
|
17
|
-
const {getStorageKey, ROOT_TYPE} = require('../store/RelayStoreUtils');
|
|
18
|
-
|
|
19
15
|
import type {
|
|
20
16
|
RecordProxy,
|
|
21
17
|
RecordSourceProxy,
|
|
@@ -26,6 +22,9 @@ import type {ReaderLinkedField} from '../util/ReaderNode';
|
|
|
26
22
|
import type {DataID} from '../util/RelayRuntimeTypes';
|
|
27
23
|
import type RelayRecordSourceMutator from './RelayRecordSourceMutator';
|
|
28
24
|
|
|
25
|
+
const {ROOT_TYPE, getStorageKey} = require('../store/RelayStoreUtils');
|
|
26
|
+
const invariant = require('invariant');
|
|
27
|
+
|
|
29
28
|
/**
|
|
30
29
|
* @internal
|
|
31
30
|
*
|
|
@@ -12,16 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
16
|
-
|
|
17
|
-
const invariant = require('invariant');
|
|
18
|
-
const isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
19
|
-
|
|
20
|
-
const {getRequest} = require('../query/GraphQLTag');
|
|
21
|
-
const {
|
|
22
|
-
createOperationDescriptor,
|
|
23
|
-
} = require('../store/RelayModernOperationDescriptor');
|
|
24
|
-
|
|
25
15
|
import type {GraphQLTaggedNode} from '../query/GraphQLTag';
|
|
26
16
|
import type {
|
|
27
17
|
IEnvironment,
|
|
@@ -30,6 +20,14 @@ import type {
|
|
|
30
20
|
import type {Disposable, Variables} from '../util/RelayRuntimeTypes';
|
|
31
21
|
import type {DeclarativeMutationConfig} from './RelayDeclarativeMutationConfig';
|
|
32
22
|
|
|
23
|
+
const {getRequest} = require('../query/GraphQLTag');
|
|
24
|
+
const isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
25
|
+
const {
|
|
26
|
+
createOperationDescriptor,
|
|
27
|
+
} = require('../store/RelayModernOperationDescriptor');
|
|
28
|
+
const RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
29
|
+
const invariant = require('invariant');
|
|
30
|
+
|
|
33
31
|
export type OptimisticMutationConfig = {|
|
|
34
32
|
configs?: ?Array<DeclarativeMutationConfig>,
|
|
35
33
|
mutation: GraphQLTaggedNode,
|
|
@@ -12,23 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
16
|
-
|
|
17
|
-
const invariant = require('invariant');
|
|
18
|
-
const isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
19
|
-
const validateMutation = require('./validateMutation');
|
|
20
|
-
const warning = require('warning');
|
|
21
|
-
|
|
22
|
-
const {getRequest} = require('../query/GraphQLTag');
|
|
23
|
-
const {generateUniqueClientID} = require('../store/ClientID');
|
|
24
|
-
const {
|
|
25
|
-
createOperationDescriptor,
|
|
26
|
-
} = require('../store/RelayModernOperationDescriptor');
|
|
27
|
-
|
|
28
15
|
import type {PayloadError, UploadableMap} from '../network/RelayNetworkTypes';
|
|
29
16
|
import type {GraphQLTaggedNode} from '../query/GraphQLTag';
|
|
30
17
|
import type {
|
|
31
18
|
IEnvironment,
|
|
19
|
+
MutationParameters,
|
|
32
20
|
SelectorStoreUpdater,
|
|
33
21
|
} from '../store/RelayStoreTypes';
|
|
34
22
|
import type {
|
|
@@ -38,6 +26,17 @@ import type {
|
|
|
38
26
|
} from '../util/RelayRuntimeTypes';
|
|
39
27
|
import type {DeclarativeMutationConfig} from './RelayDeclarativeMutationConfig';
|
|
40
28
|
|
|
29
|
+
const {getRequest} = require('../query/GraphQLTag');
|
|
30
|
+
const {generateUniqueClientID} = require('../store/ClientID');
|
|
31
|
+
const isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
32
|
+
const {
|
|
33
|
+
createOperationDescriptor,
|
|
34
|
+
} = require('../store/RelayModernOperationDescriptor');
|
|
35
|
+
const RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
36
|
+
const validateMutation = require('./validateMutation');
|
|
37
|
+
const invariant = require('invariant');
|
|
38
|
+
const warning = require('warning');
|
|
39
|
+
|
|
41
40
|
export type DEPRECATED_MutationConfig<T> = {|
|
|
42
41
|
configs?: Array<DeclarativeMutationConfig>,
|
|
43
42
|
cacheConfig?: CacheConfig,
|
|
@@ -52,12 +51,6 @@ export type DEPRECATED_MutationConfig<T> = {|
|
|
|
52
51
|
updater?: ?SelectorStoreUpdater,
|
|
53
52
|
|};
|
|
54
53
|
|
|
55
|
-
export type MutationParameters = {|
|
|
56
|
-
+response: {...},
|
|
57
|
-
+variables: interface {},
|
|
58
|
-
+rawResponse?: {...},
|
|
59
|
-
|};
|
|
60
|
-
|
|
61
54
|
export type MutationConfig<T: MutationParameters> = {|
|
|
62
55
|
configs?: Array<DeclarativeMutationConfig>,
|
|
63
56
|
cacheConfig?: CacheConfig,
|
|
@@ -13,31 +13,17 @@
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
15
|
import type {
|
|
16
|
-
NormalizationSelection,
|
|
17
16
|
NormalizationField,
|
|
17
|
+
NormalizationSelection,
|
|
18
18
|
} from '../util/NormalizationNode';
|
|
19
19
|
import type {ConcreteRequest} from '../util/RelayConcreteNode';
|
|
20
20
|
import type {Variables} from '../util/RelayRuntimeTypes';
|
|
21
21
|
|
|
22
|
-
type ValidationContext = {|
|
|
23
|
-
visitedPaths: Set<string>,
|
|
24
|
-
path: string,
|
|
25
|
-
variables: Variables,
|
|
26
|
-
missingDiff: Object,
|
|
27
|
-
extraDiff: Object,
|
|
28
|
-
moduleImportPaths: Set<string>,
|
|
29
|
-
|};
|
|
30
|
-
|
|
31
|
-
const warning = require('warning');
|
|
32
|
-
|
|
33
|
-
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
34
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
35
|
-
|
|
36
22
|
const {
|
|
37
23
|
ACTOR_CHANGE,
|
|
38
|
-
CONDITION,
|
|
39
24
|
CLIENT_COMPONENT,
|
|
40
25
|
CLIENT_EXTENSION,
|
|
26
|
+
CONDITION,
|
|
41
27
|
DEFER,
|
|
42
28
|
FLIGHT_FIELD,
|
|
43
29
|
FRAGMENT_SPREAD,
|
|
@@ -50,6 +36,18 @@ const {
|
|
|
50
36
|
STREAM,
|
|
51
37
|
TYPE_DISCRIMINATOR,
|
|
52
38
|
} = require('../util/RelayConcreteNode');
|
|
39
|
+
const warning = require('warning');
|
|
40
|
+
|
|
41
|
+
type ValidationContext = {|
|
|
42
|
+
visitedPaths: Set<string>,
|
|
43
|
+
path: string,
|
|
44
|
+
variables: Variables,
|
|
45
|
+
missingDiff: Object,
|
|
46
|
+
extraDiff: Object,
|
|
47
|
+
moduleImportPaths: Set<string>,
|
|
48
|
+
|};
|
|
49
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
50
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
53
51
|
|
|
54
52
|
let validateMutation = () => {};
|
|
55
53
|
if (__DEV__) {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayObservable = require('./RelayObservable');
|
|
16
|
-
|
|
17
15
|
import type {ExecuteFunction, FetchFunction} from './RelayNetworkTypes';
|
|
18
16
|
|
|
17
|
+
const RelayObservable = require('./RelayObservable');
|
|
18
|
+
|
|
19
19
|
/**
|
|
20
20
|
* Converts a FetchFunction into an ExecuteFunction for use by RelayNetwork.
|
|
21
21
|
*/
|
|
@@ -12,22 +12,21 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const invariant = require('invariant');
|
|
16
|
-
|
|
17
|
-
const {convertFetch} = require('./ConvertToExecuteFunction');
|
|
18
|
-
|
|
19
15
|
import type {RequestParameters} from '../util/RelayConcreteNode';
|
|
20
16
|
import type {CacheConfig, Variables} from '../util/RelayRuntimeTypes';
|
|
21
17
|
import type {
|
|
22
18
|
FetchFunction,
|
|
23
19
|
GraphQLResponse,
|
|
24
|
-
LogRequestInfoFunction,
|
|
25
20
|
INetwork,
|
|
21
|
+
LogRequestInfoFunction,
|
|
26
22
|
SubscribeFunction,
|
|
27
23
|
UploadableMap,
|
|
28
24
|
} from './RelayNetworkTypes';
|
|
29
25
|
import type RelayObservable from './RelayObservable';
|
|
30
26
|
|
|
27
|
+
const {convertFetch} = require('./ConvertToExecuteFunction');
|
|
28
|
+
const invariant = require('invariant');
|
|
29
|
+
|
|
31
30
|
/**
|
|
32
31
|
* Creates an implementation of the `Network` interface defined in
|
|
33
32
|
* `RelayNetworkTypes` given `fetch` and `subscribe` functions.
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const invariant = require('invariant');
|
|
16
|
-
const stableCopy = require('../util/stableCopy');
|
|
17
|
-
|
|
18
15
|
import type {Variables} from '../util/RelayRuntimeTypes';
|
|
19
16
|
import type {
|
|
20
17
|
GraphQLResponse,
|
|
21
18
|
GraphQLSingularResponse,
|
|
22
19
|
} from './RelayNetworkTypes';
|
|
23
20
|
|
|
21
|
+
const stableCopy = require('../util/stableCopy');
|
|
22
|
+
const invariant = require('invariant');
|
|
23
|
+
|
|
24
24
|
type Response = {
|
|
25
25
|
fetchTime: number,
|
|
26
26
|
payload: GraphQLResponse,
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const generateID = require('../util/generateID');
|
|
16
|
-
|
|
17
15
|
import type ActorSpecificEnvironment from '../multi-actor-environment/ActorSpecificEnvironment';
|
|
18
16
|
import type RelayModernEnvironment from '../store/RelayModernEnvironment';
|
|
19
17
|
import type {RequestParameters} from '../util/RelayConcreteNode';
|
|
20
18
|
import type {CacheConfig, Variables} from '../util/RelayRuntimeTypes';
|
|
21
19
|
import type {
|
|
22
|
-
INetwork,
|
|
23
20
|
GraphQLResponse,
|
|
21
|
+
INetwork,
|
|
24
22
|
UploadableMap,
|
|
25
23
|
} from './RelayNetworkTypes';
|
|
26
24
|
import type RelayObservable from './RelayObservable';
|
|
27
25
|
|
|
26
|
+
const generateID = require('../util/generateID');
|
|
27
|
+
|
|
28
28
|
/**
|
|
29
29
|
* Wraps the network with logging to ensure that network requests are
|
|
30
30
|
* always logged. Relying on each network callsite to be wrapped is
|
package/package.json
CHANGED
package/query/GraphQLTag.js.flow
CHANGED
|
@@ -12,19 +12,18 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const RelayConcreteNode = require('../util/RelayConcreteNode');
|
|
16
|
-
|
|
17
|
-
const invariant = require('invariant');
|
|
18
|
-
const warning = require('warning');
|
|
19
|
-
|
|
20
15
|
import type {
|
|
21
16
|
ReaderFragment,
|
|
22
|
-
ReaderRefetchableFragment,
|
|
23
|
-
ReaderPaginationFragment,
|
|
24
17
|
ReaderInlineDataFragment,
|
|
18
|
+
ReaderPaginationFragment,
|
|
19
|
+
ReaderRefetchableFragment,
|
|
25
20
|
} from '../util/ReaderNode';
|
|
26
21
|
import type {ConcreteRequest} from '../util/RelayConcreteNode';
|
|
27
22
|
|
|
23
|
+
const RelayConcreteNode = require('../util/RelayConcreteNode');
|
|
24
|
+
const invariant = require('invariant');
|
|
25
|
+
const warning = require('warning');
|
|
26
|
+
|
|
28
27
|
// The type of a graphql`...` tagged template expression.
|
|
29
28
|
export type GraphQLTaggedNode =
|
|
30
29
|
| ReaderFragment
|
package/query/fetchQuery.js.flow
CHANGED
|
@@ -13,17 +13,6 @@
|
|
|
13
13
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
const RelayObservable = require('../network/RelayObservable');
|
|
17
|
-
|
|
18
|
-
const fetchQueryInternal = require('./fetchQueryInternal');
|
|
19
|
-
const invariant = require('invariant');
|
|
20
|
-
const reportMissingRequiredFields = require('../util/reportMissingRequiredFields');
|
|
21
|
-
|
|
22
|
-
const {
|
|
23
|
-
createOperationDescriptor,
|
|
24
|
-
} = require('../store/RelayModernOperationDescriptor');
|
|
25
|
-
const {getRequest} = require('./GraphQLTag');
|
|
26
|
-
|
|
27
16
|
import type {
|
|
28
17
|
CacheConfig,
|
|
29
18
|
FetchQueryFetchPolicy,
|
|
@@ -35,6 +24,15 @@ import type {
|
|
|
35
24
|
VariablesOf,
|
|
36
25
|
} from 'relay-runtime';
|
|
37
26
|
|
|
27
|
+
const RelayObservable = require('../network/RelayObservable');
|
|
28
|
+
const {
|
|
29
|
+
createOperationDescriptor,
|
|
30
|
+
} = require('../store/RelayModernOperationDescriptor');
|
|
31
|
+
const reportMissingRequiredFields = require('../util/reportMissingRequiredFields');
|
|
32
|
+
const fetchQueryInternal = require('./fetchQueryInternal');
|
|
33
|
+
const {getRequest} = require('./GraphQLTag');
|
|
34
|
+
const invariant = require('invariant');
|
|
35
|
+
|
|
38
36
|
/**
|
|
39
37
|
* Fetches the given query and variables on the provided environment,
|
|
40
38
|
* and de-dupes identical in-flight requests.
|
|
@@ -12,11 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
const Observable = require('../network/RelayObservable');
|
|
16
|
-
const RelayReplaySubject = require('../util/RelayReplaySubject');
|
|
17
|
-
|
|
18
|
-
const invariant = require('invariant');
|
|
19
|
-
|
|
20
15
|
import type {GraphQLResponse} from '../network/RelayNetworkTypes';
|
|
21
16
|
import type {Subscription} from '../network/RelayObservable';
|
|
22
17
|
import type {
|
|
@@ -26,6 +21,10 @@ import type {
|
|
|
26
21
|
} from '../store/RelayStoreTypes';
|
|
27
22
|
import type {RequestIdentifier} from '../util/getRequestIdentifier';
|
|
28
23
|
|
|
24
|
+
const Observable = require('../network/RelayObservable');
|
|
25
|
+
const RelayReplaySubject = require('../util/RelayReplaySubject');
|
|
26
|
+
const invariant = require('invariant');
|
|
27
|
+
|
|
29
28
|
type RequestCacheEntry = {|
|
|
30
29
|
+identifier: RequestIdentifier,
|
|
31
30
|
+subject: RelayReplaySubject<GraphQLResponse>,
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
+
import type {IEnvironment} from '../store/RelayStoreTypes';
|
|
16
|
+
import type {CacheConfig, OperationType} from '../util/RelayRuntimeTypes';
|
|
17
|
+
import type {GraphQLTaggedNode} from './GraphQLTag';
|
|
18
|
+
|
|
15
19
|
const {
|
|
16
20
|
createOperationDescriptor,
|
|
17
21
|
} = require('../store/RelayModernOperationDescriptor');
|
|
18
22
|
const {getRequest} = require('./GraphQLTag');
|
|
19
23
|
|
|
20
|
-
import type {IEnvironment} from '../store/RelayStoreTypes';
|
|
21
|
-
import type {CacheConfig, OperationType} from '../util/RelayRuntimeTypes';
|
|
22
|
-
import type {GraphQLTaggedNode} from './GraphQLTag';
|
|
23
|
-
|
|
24
24
|
/**
|
|
25
25
|
* A helper function to fetch the results of a query. Note that results for
|
|
26
26
|
* fragment spreads are masked: fields must be explicitly listed in the query in
|