@apollo/client 3.8.0-alpha.5 → 3.8.0-alpha.6
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/README.md +1 -0
- package/apollo-client.cjs +151 -72
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +20 -20
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +20 -20
- package/cache/core/cache.d.ts +1 -1
- package/cache/core/cache.d.ts.map +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/common.d.ts +7 -7
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/inmemory/entityStore.d.ts +1 -1
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +1 -1
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +3 -2
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +1 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/object-canon.d.ts +0 -1
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +1 -1
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts +12 -12
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +1 -1
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +2 -2
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +1 -1
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +4 -4
- package/cache/inmemory/types.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +1 -1
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +1 -1
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +5 -5
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +1 -1
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +9 -6
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +65 -15
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +5 -5
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +2 -2
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +1 -1
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +7 -7
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +19 -11
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +113 -62
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +113 -62
- package/core/index.js +2 -2
- package/core/index.js.map +1 -1
- package/core/types.d.ts +18 -17
- package/core/types.d.ts.map +1 -1
- package/core/types.js +1 -0
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +11 -11
- package/core/watchQueryOptions.d.ts.map +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/errors/index.d.ts +2 -2
- package/errors/index.d.ts.map +1 -1
- package/invariantErrorCodes.js +33 -33
- package/link/batch/batch.cjs +5 -3
- package/link/batch/batch.cjs.map +1 -1
- package/link/batch/batch.cjs.native.js +5 -3
- package/link/batch/batching.d.ts +2 -2
- package/link/batch/batching.d.ts.map +1 -1
- package/link/batch/batching.js +5 -3
- package/link/batch/batching.js.map +1 -1
- package/link/context/index.d.ts +2 -1
- package/link/context/index.d.ts.map +1 -1
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/core/types.d.ts +13 -12
- package/link/core/types.d.ts.map +1 -1
- package/link/core/types.js.map +1 -1
- package/link/http/checkFetcher.js +2 -2
- package/link/http/createHttpLink.d.ts +0 -1
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +2 -1
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/http.cjs +13 -38
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +13 -38
- package/link/http/iterators/async.js.map +1 -1
- package/link/http/iterators/nodeStream.js.map +1 -1
- package/link/http/iterators/promise.js.map +1 -1
- package/link/http/iterators/reader.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/responseIterator.js +1 -1
- package/link/http/responseIterator.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +2 -2
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
- package/link/http/selectHttpOptionsAndBody.js +3 -1
- package/link/http/selectHttpOptionsAndBody.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.d.ts.map +1 -1
- package/link/http/serializeFetchParameter.js +2 -2
- package/link/persisted-queries/index.d.ts +2 -2
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +3 -3
- package/link/persisted-queries/persisted-queries.cjs +3 -3
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +3 -3
- package/link/utils/throwServerError.d.ts +1 -1
- package/link/utils/throwServerError.d.ts.map +1 -1
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +2 -2
- package/package.json +15 -15
- package/react/cache/SuspenseCache.d.ts +1 -1
- package/react/cache/SuspenseCache.d.ts.map +1 -1
- package/react/cache/SuspenseCache.js.map +1 -1
- package/react/components/Query.d.ts +2 -2
- package/react/components/Query.d.ts.map +1 -1
- package/react/components/Query.js.map +1 -1
- package/react/components/Subscription.d.ts +2 -2
- package/react/components/Subscription.d.ts.map +1 -1
- package/react/components/Subscription.js.map +1 -1
- package/react/components/types.d.ts +2 -2
- package/react/components/types.d.ts.map +1 -1
- package/react/components/types.js.map +1 -1
- package/react/context/ApolloConsumer.js +2 -2
- package/react/context/ApolloProvider.js +2 -2
- package/react/context/context.cjs +4 -4
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +4 -4
- package/react/hoc/graphql.d.ts +2 -1
- package/react/hoc/graphql.d.ts.map +1 -1
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts +1 -1
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +2 -2
- package/react/hoc/hoc.cjs +4 -4
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +4 -4
- package/react/hoc/mutation-hoc.d.ts +2 -2
- package/react/hoc/mutation-hoc.d.ts.map +1 -1
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.d.ts +1 -1
- package/react/hoc/query-hoc.d.ts.map +1 -1
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.d.ts +1 -1
- package/react/hoc/subscription-hoc.d.ts.map +1 -1
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hoc/types.d.ts +6 -6
- package/react/hoc/types.d.ts.map +1 -1
- package/react/hoc/types.js.map +1 -1
- package/react/hoc/withApollo.js +2 -2
- package/react/hooks/hooks.cjs +26 -32
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +26 -32
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/useApolloClient.js +2 -2
- package/react/hooks/useFragment.d.ts +2 -1
- package/react/hooks/useFragment.d.ts.map +1 -1
- package/react/hooks/useFragment.js +9 -8
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +1 -1
- package/react/hooks/useLazyQuery.d.ts.map +1 -1
- package/react/hooks/useLazyQuery.js +3 -4
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useQuery.d.ts +3 -3
- package/react/hooks/useQuery.d.ts.map +1 -1
- package/react/hooks/useQuery.js +1 -1
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +1 -2
- package/react/hooks/useSubscription.d.ts.map +1 -1
- package/react/hooks/useSubscription.js +1 -2
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseCache.js +2 -2
- package/react/hooks/useSuspenseQuery.d.ts +1 -1
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +2 -2
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.d.ts +1 -1
- package/react/hooks/useSyncExternalStore.d.ts.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/parser/index.js +6 -6
- package/react/parser/parser.cjs +10 -10
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +10 -10
- package/react/ssr/RenderPromises.d.ts +4 -4
- package/react/ssr/RenderPromises.d.ts.map +1 -1
- package/react/ssr/RenderPromises.js.map +1 -1
- package/react/ssr/getDataFromTree.d.ts +1 -1
- package/react/ssr/getDataFromTree.d.ts.map +1 -1
- package/react/types/types.d.ts +20 -20
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +13 -3
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +13 -3
- package/testing/core/index.d.ts +1 -1
- package/testing/core/index.d.ts.map +1 -1
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockFetch.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +8 -4
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +14 -4
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
- package/testing/core/mocking/mockWatchQuery.js +4 -5
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/core/observableToPromise.d.ts +2 -2
- package/testing/core/observableToPromise.d.ts.map +1 -1
- package/testing/core/observableToPromise.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +1 -0
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +2 -2
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +2 -2
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +2 -2
- package/utilities/common/cloneDeep.js.map +1 -1
- package/utilities/common/errorHandling.d.ts +2 -2
- package/utilities/common/errorHandling.d.ts.map +1 -1
- package/utilities/common/errorHandling.js.map +1 -1
- package/utilities/common/incrementalResult.d.ts +4 -4
- package/utilities/common/incrementalResult.d.ts.map +1 -1
- package/utilities/common/incrementalResult.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.d.ts +0 -1
- package/utilities/common/maybeDeepFreeze.d.ts.map +1 -1
- package/utilities/common/maybeDeepFreeze.js +1 -1
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/common/mergeDeep.d.ts +2 -2
- package/utilities/common/mergeDeep.d.ts.map +1 -1
- package/utilities/common/mergeOptions.d.ts +3 -3
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/globals/DEV.d.ts +1 -1
- package/utilities/globals/DEV.d.ts.map +1 -1
- package/utilities/globals/DEV.js +1 -17
- package/utilities/globals/DEV.js.map +1 -1
- package/utilities/globals/global.d.ts +5 -2
- package/utilities/globals/global.d.ts.map +1 -1
- package/utilities/globals/global.js.map +1 -1
- package/utilities/globals/globals.cjs +5 -22
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +5 -22
- package/utilities/globals/index.d.ts +1 -1
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +1 -4
- package/utilities/globals/index.js.map +1 -1
- package/utilities/graphql/directives.d.ts +2 -2
- package/utilities/graphql/directives.d.ts.map +1 -1
- package/utilities/graphql/directives.js +1 -1
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.d.ts +1 -1
- package/utilities/graphql/fragments.d.ts.map +1 -1
- package/utilities/graphql/fragments.js +1 -1
- package/utilities/graphql/getFromAST.js +1 -1
- package/utilities/graphql/storeUtils.d.ts +3 -3
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.d.ts +9 -9
- package/utilities/graphql/transform.d.ts.map +1 -1
- package/utilities/graphql/transform.js +1 -1
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +2 -0
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +2 -0
- package/utilities/index.js.map +1 -1
- package/utilities/observables/Concast.d.ts +5 -5
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/policies/pagination.d.ts +7 -7
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/types/IsStrictlyAny.d.ts +3 -3
- package/utilities/types/IsStrictlyAny.d.ts.map +1 -1
- package/utilities/utilities.cjs +75 -19
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +75 -19
- package/version.js +1 -1
package/core/core.cjs.native.js
CHANGED
|
@@ -7,15 +7,15 @@ var tslib = require('tslib');
|
|
|
7
7
|
var core = require('../link/core');
|
|
8
8
|
var http = require('../link/http');
|
|
9
9
|
var equality = require('@wry/equality');
|
|
10
|
-
var cache = require('../cache');
|
|
11
10
|
var utilities = require('../utilities');
|
|
11
|
+
var cache = require('../cache');
|
|
12
12
|
var errors = require('../errors');
|
|
13
13
|
var graphql = require('graphql');
|
|
14
14
|
var utils = require('../link/utils');
|
|
15
15
|
var tsInvariant = require('ts-invariant');
|
|
16
16
|
var graphqlTag = require('graphql-tag');
|
|
17
17
|
|
|
18
|
-
var version = '3.8.0-alpha.
|
|
18
|
+
var version = '3.8.0-alpha.6';
|
|
19
19
|
|
|
20
20
|
function isNonEmptyArray(value) {
|
|
21
21
|
return Array.isArray(value) && value.length > 0;
|
|
@@ -83,13 +83,6 @@ var DeepMerger = (function () {
|
|
|
83
83
|
function isExecutionPatchIncrementalResult(value) {
|
|
84
84
|
return "incremental" in value;
|
|
85
85
|
}
|
|
86
|
-
function isExecutionPatchInitialResult(value) {
|
|
87
|
-
return "hasNext" in value && "data" in value;
|
|
88
|
-
}
|
|
89
|
-
function isExecutionPatchResult(value) {
|
|
90
|
-
return (isExecutionPatchIncrementalResult(value) ||
|
|
91
|
-
isExecutionPatchInitialResult(value));
|
|
92
|
-
}
|
|
93
86
|
function mergeIncrementalData(prevResult, result) {
|
|
94
87
|
var mergedData = prevResult;
|
|
95
88
|
var merger = new DeepMerger();
|
|
@@ -235,7 +228,7 @@ var ObservableQuery = (function (_super) {
|
|
|
235
228
|
else {
|
|
236
229
|
result.partial = true;
|
|
237
230
|
}
|
|
238
|
-
if (__DEV__ &&
|
|
231
|
+
if (globals.__DEV__ &&
|
|
239
232
|
!diff.complete &&
|
|
240
233
|
!this.options.partialRefetch &&
|
|
241
234
|
!result.loading &&
|
|
@@ -290,11 +283,11 @@ var ObservableQuery = (function (_super) {
|
|
|
290
283
|
else {
|
|
291
284
|
reobserveOptions.fetchPolicy = 'network-only';
|
|
292
285
|
}
|
|
293
|
-
if (__DEV__ && variables && hasOwnProperty$1.call(variables, "variables")) {
|
|
286
|
+
if (globals.__DEV__ && variables && hasOwnProperty$1.call(variables, "variables")) {
|
|
294
287
|
var queryDef = utilities.getQueryDefinition(this.query);
|
|
295
288
|
var vars = queryDef.variableDefinitions;
|
|
296
289
|
if (!vars || !vars.some(function (v) { return v.variable.name.value === "variables"; })) {
|
|
297
|
-
__DEV__ && globals.invariant.warn("Called refetch(".concat(JSON.stringify(variables), ") for query ").concat(((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || JSON.stringify(queryDef), ", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"));
|
|
290
|
+
globals.__DEV__ && globals.invariant.warn("Called refetch(".concat(JSON.stringify(variables), ") for query ").concat(((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || JSON.stringify(queryDef), ", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"));
|
|
298
291
|
}
|
|
299
292
|
}
|
|
300
293
|
if (variables && !equality.equal(this.options.variables, variables)) {
|
|
@@ -378,7 +371,7 @@ var ObservableQuery = (function (_super) {
|
|
|
378
371
|
options.onError(err);
|
|
379
372
|
return;
|
|
380
373
|
}
|
|
381
|
-
__DEV__ && globals.invariant.error('Unhandled GraphQL subscription error', err);
|
|
374
|
+
globals.__DEV__ && globals.invariant.error('Unhandled GraphQL subscription error', err);
|
|
382
375
|
},
|
|
383
376
|
});
|
|
384
377
|
this.subscriptions.add(subscription);
|
|
@@ -476,7 +469,7 @@ var ObservableQuery = (function (_super) {
|
|
|
476
469
|
pollingInfo.interval === pollInterval) {
|
|
477
470
|
return;
|
|
478
471
|
}
|
|
479
|
-
__DEV__ ? globals.invariant(pollInterval, 'Attempted to start a polling query without a polling interval.') : globals.invariant(pollInterval,
|
|
472
|
+
globals.__DEV__ ? globals.invariant(pollInterval, 'Attempted to start a polling query without a polling interval.') : globals.invariant(pollInterval, 13);
|
|
480
473
|
var info = pollingInfo || (this.pollingInfo = {});
|
|
481
474
|
info.interval = pollInterval;
|
|
482
475
|
var maybeFetch = function () {
|
|
@@ -614,17 +607,18 @@ function reobserveCacheFirst(obsQuery) {
|
|
|
614
607
|
return obsQuery.reobserve();
|
|
615
608
|
}
|
|
616
609
|
function defaultSubscriptionObserverErrorCallback(error) {
|
|
617
|
-
__DEV__ && globals.invariant.error('Unhandled error', error.message, error.stack);
|
|
610
|
+
globals.__DEV__ && globals.invariant.error('Unhandled error', error.message, error.stack);
|
|
618
611
|
}
|
|
619
612
|
function logMissingFieldErrors(missing) {
|
|
620
|
-
if (__DEV__ && missing) {
|
|
621
|
-
__DEV__ && globals.invariant.debug("Missing cache result fields: ".concat(JSON.stringify(missing)), missing);
|
|
613
|
+
if (globals.__DEV__ && missing) {
|
|
614
|
+
globals.__DEV__ && globals.invariant.debug("Missing cache result fields: ".concat(JSON.stringify(missing)), missing);
|
|
622
615
|
}
|
|
623
616
|
}
|
|
624
617
|
|
|
625
618
|
var LocalState = (function () {
|
|
626
619
|
function LocalState(_a) {
|
|
627
620
|
var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;
|
|
621
|
+
this.selectionsToResolveCache = new WeakMap();
|
|
628
622
|
this.cache = cache;
|
|
629
623
|
if (client) {
|
|
630
624
|
this.client = client;
|
|
@@ -739,13 +733,13 @@ var LocalState = (function () {
|
|
|
739
733
|
if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }
|
|
740
734
|
if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }
|
|
741
735
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
742
|
-
var mainDefinition, fragments, fragmentMap, definitionOperation, defaultOperationType, _a, cache, client, execContext;
|
|
736
|
+
var mainDefinition, fragments, fragmentMap, selectionsToResolve, definitionOperation, defaultOperationType, _a, cache, client, execContext, isClientFieldDescendant;
|
|
743
737
|
return tslib.__generator(this, function (_b) {
|
|
744
738
|
mainDefinition = utilities.getMainDefinition(document);
|
|
745
739
|
fragments = utilities.getFragmentDefinitions(document);
|
|
746
740
|
fragmentMap = utilities.createFragmentMap(fragments);
|
|
747
|
-
|
|
748
|
-
|
|
741
|
+
selectionsToResolve = this.collectSelectionsToResolve(mainDefinition, fragmentMap);
|
|
742
|
+
definitionOperation = mainDefinition.operation;
|
|
749
743
|
defaultOperationType = definitionOperation
|
|
750
744
|
? definitionOperation.charAt(0).toUpperCase() +
|
|
751
745
|
definitionOperation.slice(1)
|
|
@@ -758,16 +752,18 @@ var LocalState = (function () {
|
|
|
758
752
|
fragmentMatcher: fragmentMatcher,
|
|
759
753
|
defaultOperationType: defaultOperationType,
|
|
760
754
|
exportedVariables: {},
|
|
755
|
+
selectionsToResolve: selectionsToResolve,
|
|
761
756
|
onlyRunForcedResolvers: onlyRunForcedResolvers,
|
|
762
757
|
};
|
|
763
|
-
|
|
758
|
+
isClientFieldDescendant = false;
|
|
759
|
+
return [2, this.resolveSelectionSet(mainDefinition.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (result) { return ({
|
|
764
760
|
result: result,
|
|
765
761
|
exportedVariables: execContext.exportedVariables,
|
|
766
762
|
}); })];
|
|
767
763
|
});
|
|
768
764
|
});
|
|
769
765
|
};
|
|
770
|
-
LocalState.prototype.resolveSelectionSet = function (selectionSet, rootValue, execContext) {
|
|
766
|
+
LocalState.prototype.resolveSelectionSet = function (selectionSet, isClientFieldDescendant, rootValue, execContext) {
|
|
771
767
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
772
768
|
var fragmentMap, context, variables, resultsToMerge, execute;
|
|
773
769
|
var _this = this;
|
|
@@ -777,11 +773,14 @@ var LocalState = (function () {
|
|
|
777
773
|
execute = function (selection) { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
778
774
|
var fragment, typeCondition;
|
|
779
775
|
return tslib.__generator(this, function (_a) {
|
|
776
|
+
if (!isClientFieldDescendant && !execContext.selectionsToResolve.has(selection)) {
|
|
777
|
+
return [2];
|
|
778
|
+
}
|
|
780
779
|
if (!utilities.shouldInclude(selection, variables)) {
|
|
781
780
|
return [2];
|
|
782
781
|
}
|
|
783
782
|
if (utilities.isField(selection)) {
|
|
784
|
-
return [2, this.resolveField(selection, rootValue, execContext).then(function (fieldResult) {
|
|
783
|
+
return [2, this.resolveField(selection, isClientFieldDescendant, rootValue, execContext).then(function (fieldResult) {
|
|
785
784
|
var _a;
|
|
786
785
|
if (typeof fieldResult !== 'undefined') {
|
|
787
786
|
resultsToMerge.push((_a = {},
|
|
@@ -795,12 +794,12 @@ var LocalState = (function () {
|
|
|
795
794
|
}
|
|
796
795
|
else {
|
|
797
796
|
fragment = fragmentMap[selection.name.value];
|
|
798
|
-
__DEV__ ? globals.invariant(fragment, "No fragment named ".concat(selection.name.value)) : globals.invariant(fragment, 11);
|
|
797
|
+
globals.__DEV__ ? globals.invariant(fragment, "No fragment named ".concat(selection.name.value)) : globals.invariant(fragment, 11);
|
|
799
798
|
}
|
|
800
799
|
if (fragment && fragment.typeCondition) {
|
|
801
800
|
typeCondition = fragment.typeCondition.name.value;
|
|
802
801
|
if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {
|
|
803
|
-
return [2, this.resolveSelectionSet(fragment.selectionSet, rootValue, execContext).then(function (fragmentResult) {
|
|
802
|
+
return [2, this.resolveSelectionSet(fragment.selectionSet, isClientFieldDescendant, rootValue, execContext).then(function (fragmentResult) {
|
|
804
803
|
resultsToMerge.push(fragmentResult);
|
|
805
804
|
})];
|
|
806
805
|
}
|
|
@@ -814,11 +813,14 @@ var LocalState = (function () {
|
|
|
814
813
|
});
|
|
815
814
|
});
|
|
816
815
|
};
|
|
817
|
-
LocalState.prototype.resolveField = function (field, rootValue, execContext) {
|
|
816
|
+
LocalState.prototype.resolveField = function (field, isClientFieldDescendant, rootValue, execContext) {
|
|
818
817
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
819
818
|
var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;
|
|
820
819
|
var _this = this;
|
|
821
820
|
return tslib.__generator(this, function (_a) {
|
|
821
|
+
if (!rootValue) {
|
|
822
|
+
return [2, null];
|
|
823
|
+
}
|
|
822
824
|
variables = execContext.variables;
|
|
823
825
|
fieldName = field.name.value;
|
|
824
826
|
aliasedFieldName = utilities.resultKeyNameFromField(field);
|
|
@@ -842,6 +844,7 @@ var LocalState = (function () {
|
|
|
842
844
|
}
|
|
843
845
|
}
|
|
844
846
|
return [2, resultPromise.then(function (result) {
|
|
847
|
+
var _a, _b;
|
|
845
848
|
if (result === void 0) { result = defaultResult; }
|
|
846
849
|
if (field.directives) {
|
|
847
850
|
field.directives.forEach(function (directive) {
|
|
@@ -860,30 +863,70 @@ var LocalState = (function () {
|
|
|
860
863
|
if (result == null) {
|
|
861
864
|
return result;
|
|
862
865
|
}
|
|
866
|
+
var isClientField = (_b = (_a = field.directives) === null || _a === void 0 ? void 0 : _a.some(function (d) { return d.name.value === 'client'; })) !== null && _b !== void 0 ? _b : false;
|
|
863
867
|
if (Array.isArray(result)) {
|
|
864
|
-
return _this.resolveSubSelectedArray(field, result, execContext);
|
|
868
|
+
return _this.resolveSubSelectedArray(field, isClientFieldDescendant || isClientField, result, execContext);
|
|
865
869
|
}
|
|
866
870
|
if (field.selectionSet) {
|
|
867
|
-
return _this.resolveSelectionSet(field.selectionSet, result, execContext);
|
|
871
|
+
return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant || isClientField, result, execContext);
|
|
868
872
|
}
|
|
869
873
|
})];
|
|
870
874
|
});
|
|
871
875
|
});
|
|
872
876
|
};
|
|
873
|
-
LocalState.prototype.resolveSubSelectedArray = function (field, result, execContext) {
|
|
877
|
+
LocalState.prototype.resolveSubSelectedArray = function (field, isClientFieldDescendant, result, execContext) {
|
|
874
878
|
var _this = this;
|
|
875
879
|
return Promise.all(result.map(function (item) {
|
|
876
880
|
if (item === null) {
|
|
877
881
|
return null;
|
|
878
882
|
}
|
|
879
883
|
if (Array.isArray(item)) {
|
|
880
|
-
return _this.resolveSubSelectedArray(field, item, execContext);
|
|
884
|
+
return _this.resolveSubSelectedArray(field, isClientFieldDescendant, item, execContext);
|
|
881
885
|
}
|
|
882
886
|
if (field.selectionSet) {
|
|
883
|
-
return _this.resolveSelectionSet(field.selectionSet, item, execContext);
|
|
887
|
+
return _this.resolveSelectionSet(field.selectionSet, isClientFieldDescendant, item, execContext);
|
|
884
888
|
}
|
|
885
889
|
}));
|
|
886
890
|
};
|
|
891
|
+
LocalState.prototype.collectSelectionsToResolve = function (mainDefinition, fragmentMap) {
|
|
892
|
+
var isSingleASTNode = function (node) { return !Array.isArray(node); };
|
|
893
|
+
var selectionsToResolveCache = this.selectionsToResolveCache;
|
|
894
|
+
function collectByDefinition(definitionNode) {
|
|
895
|
+
if (!selectionsToResolveCache.has(definitionNode)) {
|
|
896
|
+
var matches_1 = new Set();
|
|
897
|
+
selectionsToResolveCache.set(definitionNode, matches_1);
|
|
898
|
+
graphql.visit(definitionNode, {
|
|
899
|
+
Directive: function (node, _, __, ___, ancestors) {
|
|
900
|
+
if (node.name.value === 'client') {
|
|
901
|
+
ancestors.forEach(function (node) {
|
|
902
|
+
if (isSingleASTNode(node) && graphql.isSelectionNode(node)) {
|
|
903
|
+
matches_1.add(node);
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
FragmentSpread: function (spread, _, __, ___, ancestors) {
|
|
909
|
+
var fragment = fragmentMap[spread.name.value];
|
|
910
|
+
globals.__DEV__ ? globals.invariant(fragment, "No fragment named ".concat(spread.name.value)) : globals.invariant(fragment, 12);
|
|
911
|
+
var fragmentSelections = collectByDefinition(fragment);
|
|
912
|
+
if (fragmentSelections.size > 0) {
|
|
913
|
+
ancestors.forEach(function (node) {
|
|
914
|
+
if (isSingleASTNode(node) && graphql.isSelectionNode(node)) {
|
|
915
|
+
matches_1.add(node);
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
matches_1.add(spread);
|
|
919
|
+
fragmentSelections.forEach(function (selection) {
|
|
920
|
+
matches_1.add(selection);
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
return selectionsToResolveCache.get(definitionNode);
|
|
927
|
+
}
|
|
928
|
+
return collectByDefinition(mainDefinition);
|
|
929
|
+
};
|
|
887
930
|
return LocalState;
|
|
888
931
|
}());
|
|
889
932
|
|
|
@@ -1086,7 +1129,7 @@ var QueryInfo = (function () {
|
|
|
1086
1129
|
: [];
|
|
1087
1130
|
this.reset();
|
|
1088
1131
|
if ('incremental' in result && utilities.isNonEmptyArray(result.incremental)) {
|
|
1089
|
-
var mergedData = mergeIncrementalData(this.getDiff().result, result);
|
|
1132
|
+
var mergedData = utilities.mergeIncrementalData(this.getDiff().result, result);
|
|
1090
1133
|
result.data = mergedData;
|
|
1091
1134
|
}
|
|
1092
1135
|
else if ('hasNext' in result && result.hasNext) {
|
|
@@ -1194,7 +1237,7 @@ var QueryManager = (function () {
|
|
|
1194
1237
|
this.queries.forEach(function (_info, queryId) {
|
|
1195
1238
|
_this.stopQueryNoBroadcast(queryId);
|
|
1196
1239
|
});
|
|
1197
|
-
this.cancelPendingFetches(__DEV__ ? new globals.InvariantError('QueryManager stopped while query was in flight') : new globals.InvariantError(
|
|
1240
|
+
this.cancelPendingFetches(globals.__DEV__ ? new globals.InvariantError('QueryManager stopped while query was in flight') : new globals.InvariantError(14));
|
|
1198
1241
|
};
|
|
1199
1242
|
QueryManager.prototype.cancelPendingFetches = function (error) {
|
|
1200
1243
|
this.fetchCancelFns.forEach(function (cancel) { return cancel(error); });
|
|
@@ -1208,10 +1251,10 @@ var QueryManager = (function () {
|
|
|
1208
1251
|
return tslib.__generator(this, function (_j) {
|
|
1209
1252
|
switch (_j.label) {
|
|
1210
1253
|
case 0:
|
|
1211
|
-
__DEV__ ? globals.invariant(mutation, 'mutation option is required. You must specify your GraphQL document in the mutation option.') : globals.invariant(mutation,
|
|
1212
|
-
__DEV__ ? globals.invariant(fetchPolicy === 'network-only' ||
|
|
1254
|
+
globals.__DEV__ ? globals.invariant(mutation, 'mutation option is required. You must specify your GraphQL document in the mutation option.') : globals.invariant(mutation, 15);
|
|
1255
|
+
globals.__DEV__ ? globals.invariant(fetchPolicy === 'network-only' ||
|
|
1213
1256
|
fetchPolicy === 'no-cache', "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write.") : globals.invariant(fetchPolicy === 'network-only' ||
|
|
1214
|
-
fetchPolicy === 'no-cache',
|
|
1257
|
+
fetchPolicy === 'no-cache', 16);
|
|
1215
1258
|
mutationId = this.generateMutationId();
|
|
1216
1259
|
_h = this.transform(mutation), document = _h.document, hasClientExports = _h.hasClientExports;
|
|
1217
1260
|
mutation = this.cache.transformForLink(document);
|
|
@@ -1312,7 +1355,7 @@ var QueryManager = (function () {
|
|
|
1312
1355
|
var cacheWrites = [];
|
|
1313
1356
|
var skipCache = mutation.fetchPolicy === "no-cache";
|
|
1314
1357
|
if (!skipCache && shouldWriteResult(result, mutation.errorPolicy)) {
|
|
1315
|
-
if (!isExecutionPatchIncrementalResult(result)) {
|
|
1358
|
+
if (!utilities.isExecutionPatchIncrementalResult(result)) {
|
|
1316
1359
|
cacheWrites.push({
|
|
1317
1360
|
result: result.data,
|
|
1318
1361
|
dataId: 'ROOT_MUTATION',
|
|
@@ -1320,7 +1363,7 @@ var QueryManager = (function () {
|
|
|
1320
1363
|
variables: mutation.variables,
|
|
1321
1364
|
});
|
|
1322
1365
|
}
|
|
1323
|
-
if (isExecutionPatchIncrementalResult(result) && utilities.isNonEmptyArray(result.incremental)) {
|
|
1366
|
+
if (utilities.isExecutionPatchIncrementalResult(result) && utilities.isNonEmptyArray(result.incremental)) {
|
|
1324
1367
|
var diff = cache.diff({
|
|
1325
1368
|
id: "ROOT_MUTATION",
|
|
1326
1369
|
query: this.transform(mutation.document).asQuery,
|
|
@@ -1328,7 +1371,10 @@ var QueryManager = (function () {
|
|
|
1328
1371
|
optimistic: false,
|
|
1329
1372
|
returnPartialData: true,
|
|
1330
1373
|
});
|
|
1331
|
-
var mergedData =
|
|
1374
|
+
var mergedData = void 0;
|
|
1375
|
+
if (diff.result) {
|
|
1376
|
+
mergedData = mergeIncrementalData(diff.result, result);
|
|
1377
|
+
}
|
|
1332
1378
|
if (typeof mergedData !== 'undefined') {
|
|
1333
1379
|
result.data = mergedData;
|
|
1334
1380
|
cacheWrites.push({
|
|
@@ -1385,8 +1431,8 @@ var QueryManager = (function () {
|
|
|
1385
1431
|
cacheWrites.forEach(function (write) { return cache.write(write); });
|
|
1386
1432
|
}
|
|
1387
1433
|
var update = mutation.update;
|
|
1388
|
-
var isFinalResult = !isExecutionPatchResult(result) ||
|
|
1389
|
-
(isExecutionPatchIncrementalResult(result) && !result.hasNext);
|
|
1434
|
+
var isFinalResult = !utilities.isExecutionPatchResult(result) ||
|
|
1435
|
+
(utilities.isExecutionPatchIncrementalResult(result) && !result.hasNext);
|
|
1390
1436
|
if (update) {
|
|
1391
1437
|
if (!skipCache) {
|
|
1392
1438
|
var diff = cache.diff({
|
|
@@ -1444,7 +1490,7 @@ var QueryManager = (function () {
|
|
|
1444
1490
|
_this.markMutationResult(tslib.__assign(tslib.__assign({}, mutation), { result: { data: data } }), cache);
|
|
1445
1491
|
}
|
|
1446
1492
|
catch (error) {
|
|
1447
|
-
__DEV__ && globals.invariant.error(error);
|
|
1493
|
+
globals.__DEV__ && globals.invariant.error(error);
|
|
1448
1494
|
}
|
|
1449
1495
|
}, mutation.mutationId);
|
|
1450
1496
|
};
|
|
@@ -1531,11 +1577,11 @@ var QueryManager = (function () {
|
|
|
1531
1577
|
QueryManager.prototype.query = function (options, queryId) {
|
|
1532
1578
|
var _this = this;
|
|
1533
1579
|
if (queryId === void 0) { queryId = this.generateQueryId(); }
|
|
1534
|
-
__DEV__ ? globals.invariant(options.query, 'query option is required. You must specify your GraphQL document ' +
|
|
1535
|
-
'in the query option.') : globals.invariant(options.query,
|
|
1536
|
-
__DEV__ ? globals.invariant(options.query.kind === 'Document', 'You must wrap the query string in a "gql" tag.') : globals.invariant(options.query.kind === 'Document',
|
|
1537
|
-
__DEV__ ? globals.invariant(!options.returnPartialData, 'returnPartialData option only supported on watchQuery.') : globals.invariant(!options.returnPartialData,
|
|
1538
|
-
__DEV__ ? globals.invariant(!options.pollInterval, 'pollInterval option only supported on watchQuery.') : globals.invariant(!options.pollInterval,
|
|
1580
|
+
globals.__DEV__ ? globals.invariant(options.query, 'query option is required. You must specify your GraphQL document ' +
|
|
1581
|
+
'in the query option.') : globals.invariant(options.query, 17);
|
|
1582
|
+
globals.__DEV__ ? globals.invariant(options.query.kind === 'Document', 'You must wrap the query string in a "gql" tag.') : globals.invariant(options.query.kind === 'Document', 18);
|
|
1583
|
+
globals.__DEV__ ? globals.invariant(!options.returnPartialData, 'returnPartialData option only supported on watchQuery.') : globals.invariant(!options.returnPartialData, 19);
|
|
1584
|
+
globals.__DEV__ ? globals.invariant(!options.pollInterval, 'pollInterval option only supported on watchQuery.') : globals.invariant(!options.pollInterval, 20);
|
|
1539
1585
|
return this.fetchQuery(queryId, options).finally(function () { return _this.stopQuery(queryId); });
|
|
1540
1586
|
};
|
|
1541
1587
|
QueryManager.prototype.generateQueryId = function () {
|
|
@@ -1560,7 +1606,7 @@ var QueryManager = (function () {
|
|
|
1560
1606
|
if (options === void 0) { options = {
|
|
1561
1607
|
discardWatches: true,
|
|
1562
1608
|
}; }
|
|
1563
|
-
this.cancelPendingFetches(__DEV__ ? new globals.InvariantError('Store reset while query was in flight (not completed in link chain)') : new globals.InvariantError(
|
|
1609
|
+
this.cancelPendingFetches(globals.__DEV__ ? new globals.InvariantError('Store reset while query was in flight (not completed in link chain)') : new globals.InvariantError(21));
|
|
1564
1610
|
this.queries.forEach(function (queryInfo) {
|
|
1565
1611
|
if (queryInfo.observableQuery) {
|
|
1566
1612
|
queryInfo.networkStatus = exports.NetworkStatus.loading;
|
|
@@ -1633,10 +1679,10 @@ var QueryManager = (function () {
|
|
|
1633
1679
|
queries.set(queryId, oq);
|
|
1634
1680
|
});
|
|
1635
1681
|
}
|
|
1636
|
-
if (__DEV__ && queryNamesAndDocs.size) {
|
|
1682
|
+
if (globals.__DEV__ && queryNamesAndDocs.size) {
|
|
1637
1683
|
queryNamesAndDocs.forEach(function (included, nameOrDoc) {
|
|
1638
1684
|
if (!included) {
|
|
1639
|
-
__DEV__ && globals.invariant.warn("Unknown query ".concat(typeof nameOrDoc === "string" ? "named " : "").concat(JSON.stringify(nameOrDoc, null, 2), " requested in refetchQueries options.include array"));
|
|
1685
|
+
globals.__DEV__ && globals.invariant.warn("Unknown query ".concat(typeof nameOrDoc === "string" ? "named " : "").concat(JSON.stringify(nameOrDoc, null, 2), " requested in refetchQueries options.include array"));
|
|
1640
1686
|
}
|
|
1641
1687
|
});
|
|
1642
1688
|
}
|
|
@@ -1933,7 +1979,7 @@ var QueryManager = (function () {
|
|
|
1933
1979
|
var resultsFromCache = function (diff, networkStatus) {
|
|
1934
1980
|
if (networkStatus === void 0) { networkStatus = queryInfo.networkStatus || exports.NetworkStatus.loading; }
|
|
1935
1981
|
var data = diff.result;
|
|
1936
|
-
if (__DEV__ &&
|
|
1982
|
+
if (globals.__DEV__ &&
|
|
1937
1983
|
!returnPartialData &&
|
|
1938
1984
|
!equality.equal(data, {})) {
|
|
1939
1985
|
logMissingFieldErrors(diff.missing);
|
|
@@ -1948,6 +1994,11 @@ var QueryManager = (function () {
|
|
|
1948
1994
|
onlyRunForcedResolvers: true,
|
|
1949
1995
|
}).then(function (resolved) { return fromData(resolved.data || void 0); });
|
|
1950
1996
|
}
|
|
1997
|
+
if (errorPolicy === 'none' &&
|
|
1998
|
+
networkStatus === exports.NetworkStatus.refetch &&
|
|
1999
|
+
Array.isArray(diff.missing)) {
|
|
2000
|
+
return fromData(void 0);
|
|
2001
|
+
}
|
|
1951
2002
|
return fromData(data);
|
|
1952
2003
|
};
|
|
1953
2004
|
var cacheWriteBehavior = fetchPolicy === "no-cache" ? 0 :
|
|
@@ -2041,7 +2092,7 @@ var ApolloClient = (function () {
|
|
|
2041
2092
|
this.clearStoreCallbacks = [];
|
|
2042
2093
|
var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, _c = options.connectToDevTools, connectToDevTools = _c === void 0 ? typeof window === 'object' &&
|
|
2043
2094
|
!window.__APOLLO_CLIENT__ &&
|
|
2044
|
-
__DEV__ : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? false : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;
|
|
2095
|
+
globals.__DEV__ : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? false : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;
|
|
2045
2096
|
var link = options.link;
|
|
2046
2097
|
if (!link) {
|
|
2047
2098
|
link = uri
|
|
@@ -2049,7 +2100,7 @@ var ApolloClient = (function () {
|
|
|
2049
2100
|
: core.ApolloLink.empty();
|
|
2050
2101
|
}
|
|
2051
2102
|
if (!cache) {
|
|
2052
|
-
throw __DEV__ ? new globals.InvariantError("To initialize Apollo Client, you must specify a 'cache' property " +
|
|
2103
|
+
throw globals.__DEV__ ? new globals.InvariantError("To initialize Apollo Client, you must specify a 'cache' property " +
|
|
2053
2104
|
"in the options object. \n" +
|
|
2054
2105
|
"For more information, please visit: https://go.apollo.dev/c/docs") : new globals.InvariantError(9);
|
|
2055
2106
|
}
|
|
@@ -2070,7 +2121,7 @@ var ApolloClient = (function () {
|
|
|
2070
2121
|
if (connectToDevTools && typeof window === 'object') {
|
|
2071
2122
|
window.__APOLLO_CLIENT__ = this;
|
|
2072
2123
|
}
|
|
2073
|
-
if (!hasSuggestedDevtools && connectToDevTools && __DEV__) {
|
|
2124
|
+
if (!hasSuggestedDevtools && connectToDevTools && globals.__DEV__) {
|
|
2074
2125
|
hasSuggestedDevtools = true;
|
|
2075
2126
|
if (typeof window !== 'undefined' &&
|
|
2076
2127
|
window.document &&
|
|
@@ -2089,7 +2140,7 @@ var ApolloClient = (function () {
|
|
|
2089
2140
|
}
|
|
2090
2141
|
}
|
|
2091
2142
|
if (url) {
|
|
2092
|
-
__DEV__ && globals.invariant.log("Download the Apollo DevTools for a better development " +
|
|
2143
|
+
globals.__DEV__ && globals.invariant.log("Download the Apollo DevTools for a better development " +
|
|
2093
2144
|
"experience: " + url);
|
|
2094
2145
|
}
|
|
2095
2146
|
}
|
|
@@ -2145,7 +2196,7 @@ var ApolloClient = (function () {
|
|
|
2145
2196
|
if (this.defaultOptions.query) {
|
|
2146
2197
|
options = utilities.mergeOptions(this.defaultOptions.query, options);
|
|
2147
2198
|
}
|
|
2148
|
-
__DEV__ ? globals.invariant(options.fetchPolicy !== 'cache-and-network', 'The cache-and-network fetchPolicy does not work with client.query, because ' +
|
|
2199
|
+
globals.__DEV__ ? globals.invariant(options.fetchPolicy !== 'cache-and-network', 'The cache-and-network fetchPolicy does not work with client.query, because ' +
|
|
2149
2200
|
'client.query can only return a single result. Please use client.watchQuery ' +
|
|
2150
2201
|
'to receive multiple results from the cache and the network, or consider ' +
|
|
2151
2202
|
'using a different fetchPolicy, such as cache-first or network-only.') : globals.invariant(options.fetchPolicy !== 'cache-and-network', 10);
|
|
@@ -2231,7 +2282,7 @@ var ApolloClient = (function () {
|
|
|
2231
2282
|
result.queries = queries;
|
|
2232
2283
|
result.results = results;
|
|
2233
2284
|
result.catch(function (error) {
|
|
2234
|
-
__DEV__ && globals.invariant.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(error));
|
|
2285
|
+
globals.__DEV__ && globals.invariant.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(error));
|
|
2235
2286
|
});
|
|
2236
2287
|
return result;
|
|
2237
2288
|
};
|
|
@@ -2263,18 +2314,18 @@ var ApolloClient = (function () {
|
|
|
2263
2314
|
return ApolloClient;
|
|
2264
2315
|
}());
|
|
2265
2316
|
|
|
2266
|
-
tsInvariant.setVerbosity(globals.
|
|
2317
|
+
tsInvariant.setVerbosity(globals.__DEV__ ? "log" : "silent");
|
|
2267
2318
|
|
|
2319
|
+
exports.Observable = utilities.Observable;
|
|
2320
|
+
exports.isReference = utilities.isReference;
|
|
2321
|
+
exports.makeReference = utilities.makeReference;
|
|
2322
|
+
exports.mergeOptions = utilities.mergeOptions;
|
|
2268
2323
|
exports.ApolloCache = cache.ApolloCache;
|
|
2269
2324
|
exports.Cache = cache.Cache;
|
|
2270
2325
|
exports.InMemoryCache = cache.InMemoryCache;
|
|
2271
2326
|
exports.MissingFieldError = cache.MissingFieldError;
|
|
2272
2327
|
exports.defaultDataIdFromObject = cache.defaultDataIdFromObject;
|
|
2273
2328
|
exports.makeVar = cache.makeVar;
|
|
2274
|
-
exports.Observable = utilities.Observable;
|
|
2275
|
-
exports.isReference = utilities.isReference;
|
|
2276
|
-
exports.makeReference = utilities.makeReference;
|
|
2277
|
-
exports.mergeOptions = utilities.mergeOptions;
|
|
2278
2329
|
exports.ApolloError = errors.ApolloError;
|
|
2279
2330
|
exports.isApolloError = errors.isApolloError;
|
|
2280
2331
|
exports.fromError = utils.fromError;
|
package/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __DEV__ } from "../utilities/globals/index.js";
|
|
2
2
|
export { ApolloClient, mergeOptions, } from "./ApolloClient.js";
|
|
3
3
|
export { ObservableQuery, } from "./ObservableQuery.js";
|
|
4
4
|
export { NetworkStatus } from "./networkStatus.js";
|
|
@@ -12,6 +12,6 @@ export { fromError, toPromise, fromPromise, throwServerError, } from "../link/ut
|
|
|
12
12
|
export { Observable, isReference, makeReference, } from "../utilities/index.js";
|
|
13
13
|
import { setVerbosity } from "ts-invariant";
|
|
14
14
|
export { setVerbosity as setLogVerbosity };
|
|
15
|
-
setVerbosity(
|
|
15
|
+
setVerbosity(__DEV__ ? "log" : "silent");
|
|
16
16
|
export { gql, resetCaches, disableFragmentWarnings, enableExperimentalFragmentVariables, disableExperimentalFragmentVariables, } from 'graphql-tag';
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EACL,YAAY,EAGZ,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,eAAe,GAGhB,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,SAAS,CAAC;AAKxB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIvD,OAAO,EAGL,KAAK,EACL,WAAW,EAGX,aAAa,EAEb,iBAAiB,EACjB,uBAAuB,EAEvB,OAAO,GAQR,MAAM,UAAU,CAAC;AAElB,cAAc,yBAAyB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EAEX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,UAAU,EAIV,WAAW,EACX,aAAa,GAEd,MAAM,cAAc,CAAC;AAQtB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,CAAA;AAC1C,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAczC,OAAO,EACL,GAAG,EACH,WAAW,EACX,uBAAuB,EACvB,mCAAmC,EACnC,oCAAoC,GACrC,MAAM,aAAa,CAAC","sourcesContent":["/* Core */\n\nimport { __DEV__ } from '../utilities/globals';\n\nexport {\n ApolloClient,\n ApolloClientOptions,\n DefaultOptions,\n mergeOptions,\n} from './ApolloClient';\nexport {\n ObservableQuery,\n FetchMoreOptions,\n UpdateQueryOptions,\n} from './ObservableQuery';\nexport {\n QueryOptions,\n WatchQueryOptions,\n MutationOptions,\n SubscriptionOptions,\n FetchPolicy,\n WatchQueryFetchPolicy,\n ErrorPolicy,\n FetchMoreQueryOptions,\n SubscribeToMoreOptions,\n} from './watchQueryOptions';\nexport { NetworkStatus } from './networkStatus';\nexport * from './types';\nexport {\n Resolver,\n FragmentMatcher,\n} from './LocalState';\nexport { isApolloError, ApolloError } from '../errors';\n\n/* Cache */\n\nexport {\n // All the exports (types and values) from ../cache, minus cacheSlot,\n // which we want to keep semi-private.\n Cache,\n ApolloCache,\n Transaction,\n DataProxy,\n InMemoryCache,\n InMemoryCacheConfig,\n MissingFieldError,\n defaultDataIdFromObject,\n ReactiveVar,\n makeVar,\n TypePolicies,\n TypePolicy,\n FieldPolicy,\n FieldReadFunction,\n FieldMergeFunction,\n FieldFunctionOptions,\n PossibleTypesMap,\n} from '../cache';\n\nexport * from '../cache/inmemory/types';\n\n/* Link */\n\nexport * from '../link/core';\nexport * from '../link/http';\nexport {\n fromError,\n toPromise,\n fromPromise,\n ServerError,\n throwServerError,\n} from '../link/utils';\n\n/* Utilities */\n\nexport {\n Observable,\n Observer,\n ObservableSubscription,\n Reference,\n isReference,\n makeReference,\n StoreObject,\n} from '../utilities';\n\n/* Supporting */\n\n// The verbosity of invariant.{log,warn,error} can be controlled globally\n// (for anyone using the same ts-invariant package) by passing \"log\",\n// \"warn\", \"error\", or \"silent\" to setVerbosity (\"log\" is the default).\n// Note that all invariant.* logging is hidden in production.\nimport { setVerbosity } from \"ts-invariant\";\nexport { setVerbosity as setLogVerbosity }\nsetVerbosity(__DEV__ ? \"log\" : \"silent\");\n\n// Note that importing `gql` by itself, then destructuring\n// additional properties separately before exporting, is intentional.\n// Due to the way the `graphql-tag` library is setup, certain bundlers\n// can't find the properties added to the exported `gql` function without\n// additional guidance (e.g. Rollup - see\n// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).\n// Instead of having people that are using bundlers with `@apollo/client` add\n// extra bundler config to help `graphql-tag` exports be found (which would be\n// awkward since they aren't importing `graphql-tag` themselves), this\n// workaround of pulling the extra properties off the `gql` function,\n// then re-exporting them separately, helps keeps bundlers happy without any\n// additional config changes.\nexport {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n} from 'graphql-tag';\n"]}
|
package/core/types.d.ts
CHANGED
|
@@ -10,21 +10,22 @@ import { QueryOptions } from './watchQueryOptions';
|
|
|
10
10
|
import { Cache } from '../cache';
|
|
11
11
|
import { IsStrictlyAny } from '../utilities';
|
|
12
12
|
export { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
13
|
+
export interface DefaultContext extends Record<string, any> {
|
|
14
|
+
}
|
|
15
|
+
export type QueryListener = (queryInfo: QueryInfo) => void;
|
|
16
|
+
export type OnQueryUpdated<TResult> = (observableQuery: ObservableQuery<any>, diff: Cache.DiffResult<any>, lastDiff: Cache.DiffResult<any> | undefined) => boolean | TResult;
|
|
17
|
+
export type RefetchQueryDescriptor = string | DocumentNode;
|
|
18
|
+
export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions;
|
|
19
|
+
type RefetchQueriesIncludeShorthand = "all" | "active";
|
|
20
|
+
export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand;
|
|
21
|
+
export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand;
|
|
21
22
|
export interface RefetchQueriesOptions<TCache extends ApolloCache<any>, TResult> {
|
|
22
23
|
updateCache?: (cache: TCache) => void;
|
|
23
24
|
include?: RefetchQueriesInclude;
|
|
24
25
|
optimistic?: boolean;
|
|
25
26
|
onQueryUpdated?: OnQueryUpdated<TResult> | null;
|
|
26
27
|
}
|
|
27
|
-
export
|
|
28
|
+
export type RefetchQueriesPromiseResults<TResult> = IsStrictlyAny<TResult> extends true ? any[] : TResult extends boolean ? ApolloQueryResult<any>[] : TResult extends PromiseLike<infer U> ? U[] : TResult[];
|
|
28
29
|
export interface RefetchQueriesResult<TResult> extends Promise<RefetchQueriesPromiseResults<TResult>> {
|
|
29
30
|
queries: ObservableQuery<any>[];
|
|
30
31
|
results: InternalRefetchQueriesResult<TResult>[];
|
|
@@ -33,11 +34,11 @@ export interface InternalRefetchQueriesOptions<TCache extends ApolloCache<any>,
|
|
|
33
34
|
include?: InternalRefetchQueriesInclude;
|
|
34
35
|
removeOptimistic?: string;
|
|
35
36
|
}
|
|
36
|
-
export
|
|
37
|
-
export
|
|
37
|
+
export type InternalRefetchQueriesResult<TResult> = TResult extends boolean ? Promise<ApolloQueryResult<any>> : TResult;
|
|
38
|
+
export type InternalRefetchQueriesMap<TResult> = Map<ObservableQuery<any>, InternalRefetchQueriesResult<TResult>>;
|
|
38
39
|
export type { QueryOptions as PureQueryOptions };
|
|
39
|
-
export
|
|
40
|
-
export
|
|
40
|
+
export type OperationVariables = Record<string, any>;
|
|
41
|
+
export type ApolloQueryResult<T> = {
|
|
41
42
|
data: T;
|
|
42
43
|
errors?: ReadonlyArray<GraphQLError>;
|
|
43
44
|
error?: ApolloError;
|
|
@@ -45,20 +46,20 @@ export declare type ApolloQueryResult<T> = {
|
|
|
45
46
|
networkStatus: NetworkStatus;
|
|
46
47
|
partial?: boolean;
|
|
47
48
|
};
|
|
48
|
-
export
|
|
49
|
+
export type MutationQueryReducer<T> = (previousResult: Record<string, any>, options: {
|
|
49
50
|
mutationResult: FetchResult<T>;
|
|
50
51
|
queryName: string | undefined;
|
|
51
52
|
queryVariables: Record<string, any>;
|
|
52
53
|
}) => Record<string, any>;
|
|
53
|
-
export
|
|
54
|
+
export type MutationQueryReducersMap<T = {
|
|
54
55
|
[key: string]: any;
|
|
55
56
|
}> = {
|
|
56
57
|
[queryName: string]: MutationQueryReducer<T>;
|
|
57
58
|
};
|
|
58
|
-
export
|
|
59
|
+
export type MutationUpdaterFn<T = {
|
|
59
60
|
[key: string]: any;
|
|
60
61
|
}> = (cache: ApolloCache<T>, mutationResult: FetchResult<T>) => void;
|
|
61
|
-
export
|
|
62
|
+
export type MutationUpdaterFunction<TData, TVariables, TContext, TCache extends ApolloCache<any>> = (cache: TCache, result: Omit<FetchResult<TData>, 'context'>, options: {
|
|
62
63
|
context?: TContext;
|
|
63
64
|
variables?: TVariables;
|
|
64
65
|
}) => void;
|
package/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,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