Socket
Socket
Sign inDemoInstall

@apollo/client

Package Overview
Dependencies
Maintainers
4
Versions
574
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/client - npm Package Compare versions

Comparing version 0.0.0-pr-11984-20240801210716 to 0.0.0-pr-11990-20240805150134

1

core/ObservableQuery.d.ts

@@ -45,2 +45,3 @@ import { NetworkStatus } from "./networkStatus.js";

});
private prepareVariables;
result(): Promise<ApolloQueryResult<TData>>;

@@ -47,0 +48,0 @@ /** @internal */

125

core/ObservableQuery.js

@@ -98,2 +98,6 @@ import { __assign, __extends } from "tslib";

});
ObservableQuery.prototype.prepareVariables = function (variables, query) {
if (query === void 0) { query = this.query; }
return this.queryManager["getVariables"](this.queryManager.transform(query), variables);
};
ObservableQuery.prototype.result = function () {

@@ -271,3 +275,4 @@ var _this = this;

// Update the existing options with new variables
reobserveOptions.variables = this.options.variables = __assign(__assign({}, this.options.variables), variables);
reobserveOptions.variables = this.options.variables =
this.prepareVariables(__assign(__assign({}, this.options.variables), variables));
}

@@ -309,2 +314,7 @@ this.queryInfo.resetLastWrite();

var updatedQuerySet = new Set();
var updateQuery = fetchMoreOptions === null || fetchMoreOptions === void 0 ? void 0 : fetchMoreOptions.updateQuery;
var isCached = this.options.fetchPolicy !== "no-cache";
if (!isCached) {
invariant(updateQuery, 21);
}
return this.queryManager

@@ -317,42 +327,66 @@ .fetchQuery(qid, combinedOptions, NetworkStatus.fetchMore)

}
// Performing this cache update inside a cache.batch transaction ensures
// any affected cache.watch watchers are notified at most once about any
// updates. Most watchers will be using the QueryInfo class, which
// responds to notifications by calling reobserveCacheFirst to deliver
// fetchMore cache results back to this ObservableQuery.
_this.queryManager.cache.batch({
update: function (cache) {
var updateQuery = fetchMoreOptions.updateQuery;
if (updateQuery) {
cache.updateQuery({
query: _this.query,
variables: _this.variables,
returnPartialData: true,
optimistic: false,
}, function (previous) {
return updateQuery(previous, {
fetchMoreResult: fetchMoreResult.data,
if (isCached) {
// Performing this cache update inside a cache.batch transaction ensures
// any affected cache.watch watchers are notified at most once about any
// updates. Most watchers will be using the QueryInfo class, which
// responds to notifications by calling reobserveCacheFirst to deliver
// fetchMore cache results back to this ObservableQuery.
_this.queryManager.cache.batch({
update: function (cache) {
var updateQuery = fetchMoreOptions.updateQuery;
if (updateQuery) {
cache.updateQuery({
query: _this.query,
variables: _this.variables,
returnPartialData: true,
optimistic: false,
}, function (previous) {
return updateQuery(previous, {
fetchMoreResult: fetchMoreResult.data,
variables: combinedOptions.variables,
});
});
}
else {
// If we're using a field policy instead of updateQuery, the only
// thing we need to do is write the new data to the cache using
// combinedOptions.variables (instead of this.variables, which is
// what this.updateQuery uses, because it works by abusing the
// original field value, keyed by the original variables).
cache.writeQuery({
query: combinedOptions.query,
variables: combinedOptions.variables,
data: fetchMoreResult.data,
});
});
}
else {
// If we're using a field policy instead of updateQuery, the only
// thing we need to do is write the new data to the cache using
// combinedOptions.variables (instead of this.variables, which is
// what this.updateQuery uses, because it works by abusing the
// original field value, keyed by the original variables).
cache.writeQuery({
query: combinedOptions.query,
variables: combinedOptions.variables,
data: fetchMoreResult.data,
});
}
},
onWatchUpdated: function (watch) {
// Record the DocumentNode associated with any watched query whose
// data were updated by the cache writes above.
updatedQuerySet.add(watch.query);
},
});
}
},
onWatchUpdated: function (watch) {
// Record the DocumentNode associated with any watched query whose
// data were updated by the cache writes above.
updatedQuerySet.add(watch.query);
},
});
}
else {
// There is a possibility `lastResult` may not be set when
// `fetchMore` is called which would cause this to crash. This should
// only happen if we haven't previously reported a result. We don't
// quite know what the right behavior should be here since this block
// of code runs after the fetch result has executed on the network.
// We plan to let it crash in the meantime.
//
// If we get bug reports due to the `data` property access on
// undefined, this should give us a real-world scenario that we can
// use to test against and determine the right behavior. If we do end
// up changing this behavior, this may require, for example, an
// adjustment to the types on `updateQuery` since that function
// expects that the first argument always contains previous result
// data, but not `undefined`.
var lastResult = _this.getLast("result");
var data = updateQuery(lastResult.data, {
fetchMoreResult: fetchMoreResult.data,
variables: combinedOptions.variables,
});
_this.reportResult(__assign(__assign({}, lastResult), { data: data }), _this.variables);
}
return fetchMoreResult;

@@ -366,3 +400,3 @@ })

// result with the unchanged data.
if (!updatedQuerySet.has(_this.query)) {
if (isCached && !updatedQuerySet.has(_this.query)) {
reobserveCacheFirst(_this);

@@ -406,3 +440,3 @@ }

}
globalThis.__DEV__ !== false && invariant.error(21, err);
globalThis.__DEV__ !== false && invariant.error(22, err);
},

@@ -562,3 +596,3 @@ });

}
invariant(pollInterval, 22);
invariant(pollInterval, 23);
var info = pollingInfo || (this.pollingInfo = {});

@@ -623,2 +657,5 @@ info.interval = pollInterval;

var oldFetchPolicy = this.options.fetchPolicy;
if (newOptions && newOptions.variables) {
newOptions = __assign(__assign({}, newOptions), { variables: this.prepareVariables(newOptions.variables, newOptions.query) });
}
var mergedOptions = compact(this.options, newOptions || {});

@@ -803,7 +840,7 @@ var options = useDisposableConcast ?

function defaultSubscriptionObserverErrorCallback(error) {
globalThis.__DEV__ !== false && invariant.error(23, error.message, error.stack);
globalThis.__DEV__ !== false && invariant.error(24, error.message, error.stack);
}
export function logMissingFieldErrors(missing) {
if (globalThis.__DEV__ !== false && missing) {
globalThis.__DEV__ !== false && invariant.debug(24, missing);
globalThis.__DEV__ !== false && invariant.debug(25, missing);
}

@@ -810,0 +847,0 @@ }

@@ -75,3 +75,3 @@ import { __assign, __awaiter, __generator } from "tslib";

});
this.cancelPendingFetches(newInvariantError(25));
this.cancelPendingFetches(newInvariantError(26));
};

@@ -90,4 +90,4 @@ QueryManager.prototype.cancelPendingFetches = function (error) {

case 0:
invariant(mutation, 26);
invariant(fetchPolicy === "network-only" || fetchPolicy === "no-cache", 27);
invariant(mutation, 27);
invariant(fetchPolicy === "network-only" || fetchPolicy === "no-cache", 28);
mutationId = this.generateMutationId();

@@ -466,6 +466,6 @@ mutation = this.cache.transformForLink(this.transform(mutation));

if (queryId === void 0) { queryId = this.generateQueryId(); }
invariant(options.query, 28);
invariant(options.query.kind === "Document", 29);
invariant(!options.returnPartialData, 30);
invariant(!options.pollInterval, 31);
invariant(options.query, 29);
invariant(options.query.kind === "Document", 30);
invariant(!options.returnPartialData, 31);
invariant(!options.pollInterval, 32);
return this.fetchQuery(queryId, __assign(__assign({}, options), { query: this.transform(options.query) })).finally(function () { return _this.stopQuery(queryId); });

@@ -500,3 +500,3 @@ };

// so far and not yet resolved (in the case of queries).
this.cancelPendingFetches(newInvariantError(32));
this.cancelPendingFetches(newInvariantError(33));
this.queries.forEach(function (queryInfo) {

@@ -583,3 +583,3 @@ if (queryInfo.observableQuery) {

if (!included) {
globalThis.__DEV__ !== false && invariant.warn(typeof nameOrDoc === "string" ? 33 : 34, nameOrDoc);
globalThis.__DEV__ !== false && invariant.warn(typeof nameOrDoc === "string" ? 34 : 35, nameOrDoc);
}

@@ -756,7 +756,6 @@ });

var hasErrors = graphQLErrors.length > 0;
var errorPolicy = options.errorPolicy;
// If we interrupted this request by calling getResultsFromLink again
// with the same QueryInfo object, we ignore the old results.
if (requestId >= queryInfo.lastRequestId) {
if (hasErrors && errorPolicy === "none") {
if (hasErrors && options.errorPolicy === "none") {
// Throwing here effectively calls observer.error.

@@ -778,10 +777,3 @@ throw queryInfo.markError(new ApolloError({

};
// In the case we start multiple network requests simulatenously, we
// want to ensure we properly set `data` if we're reporting on an old
// result which will not be caught by the conditional above that ends up
// throwing the markError result.
if (hasErrors && errorPolicy === "none") {
aqr.data = void 0;
}
if (hasErrors && errorPolicy !== "ignore") {
if (hasErrors && options.errorPolicy !== "ignore") {
aqr.errors = graphQLErrors;

@@ -788,0 +780,0 @@ aqr.networkStatus = NetworkStatus.error;

@@ -70,12 +70,17 @@ 'use strict';

},
22: {
21: {
file: "@apollo/client/core/ObservableQuery.js",
condition: "updateQuery",
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
},
23: {
file: "@apollo/client/core/ObservableQuery.js",
condition: "pollInterval",
message: "Attempted to start a polling query without a polling interval."
},
25: {
26: {
file: "@apollo/client/core/QueryManager.js",
message: "QueryManager stopped while query was in flight"
},
26: {
27: {
file: "@apollo/client/core/QueryManager.js",

@@ -85,3 +90,3 @@ condition: "mutation",

},
27: {
28: {
file: "@apollo/client/core/QueryManager.js",

@@ -91,3 +96,3 @@ condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",

},
28: {
29: {
file: "@apollo/client/core/QueryManager.js",

@@ -98,3 +103,3 @@ condition: "options.query",

},
29: {
30: {
file: "@apollo/client/core/QueryManager.js",

@@ -104,3 +109,3 @@ condition: "options.query.kind === \"Document\"",

},
30: {
31: {
file: "@apollo/client/core/QueryManager.js",

@@ -110,3 +115,3 @@ condition: "!options.returnPartialData",

},
31: {
32: {
file: "@apollo/client/core/QueryManager.js",

@@ -116,19 +121,19 @@ condition: "!options.pollInterval",

},
32: {
33: {
file: "@apollo/client/core/QueryManager.js",
message: "Store reset while query was in flight (not completed in link chain)"
},
36: {
37: {
file: "@apollo/client/link/core/ApolloLink.js",
message: "request is not implemented"
},
37: {
38: {
file: "@apollo/client/link/http/checkFetcher.js",
message: "\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "
},
39: {
40: {
file: "@apollo/client/link/http/serializeFetchParameter.js",
message: "Network request failed. %s is not serializable: %s"
},
40: {
41: {
file: "@apollo/client/link/persisted-queries/index.js",

@@ -140,3 +145,3 @@ condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",

},
41: {
42: {
file: "@apollo/client/link/persisted-queries/index.js",

@@ -146,7 +151,7 @@ condition: "forward",

},
43: {
44: {
file: "@apollo/client/link/utils/validateOperation.js",
message: "illegal argument: %s"
},
44: {
45: {
file: "@apollo/client/react/context/ApolloConsumer.js",

@@ -157,3 +162,3 @@ condition: "context && context.client",

},
45: {
46: {
file: "@apollo/client/react/context/ApolloContext.js",

@@ -166,3 +171,3 @@ condition: "\"createContext\" in React",

},
46: {
47: {
file: "@apollo/client/react/context/ApolloProvider.js",

@@ -173,3 +178,3 @@ condition: "context.client",

},
47: {
48: {
file: "@apollo/client/react/hoc/hoc-utils.js",

@@ -180,3 +185,3 @@ condition: "this.withRef",

},
48: {
49: {
file: "@apollo/client/react/hoc/withApollo.js",

@@ -187,3 +192,3 @@ condition: "operationOptions.withRef",

},
49: {
50: {
file: "@apollo/client/react/hooks/useApolloClient.js",

@@ -195,3 +200,3 @@ condition: "!!client",

},
50: {
51: {
file: "@apollo/client/react/hooks/useLoadableQuery.js",

@@ -201,3 +206,3 @@ condition: "!calledDuringRender()",

},
51: {
52: {
file: "@apollo/client/react/hooks/useLoadableQuery.js",

@@ -207,3 +212,3 @@ condition: "internalQueryRef",

},
56: {
57: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -213,3 +218,3 @@ condition: "!optionsRef.current.skip",

},
57: {
58: {
file: "@apollo/client/react/hooks/useSuspenseQuery.js",

@@ -219,3 +224,3 @@ condition: "supportedFetchPolicies.includes(fetchPolicy)",

},
60: {
61: {
file: "@apollo/client/react/internal/cache/QueryReference.js",

@@ -225,3 +230,3 @@ condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",

},
61: {
62: {
file: "@apollo/client/react/parser/index.js",

@@ -233,3 +238,3 @@ condition: "!!document && !!document.kind",

},
62: {
63: {
file: "@apollo/client/react/parser/index.js",

@@ -240,3 +245,3 @@ condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",

},
63: {
64: {
file: "@apollo/client/react/parser/index.js",

@@ -249,3 +254,3 @@ condition: "queries.length + mutations.length + subscriptions.length <= 1",

},
64: {
65: {
file: "@apollo/client/react/parser/index.js",

@@ -257,3 +262,3 @@ condition: "definitions.length === 1",

},
65: {
66: {
file: "@apollo/client/react/parser/index.js",

@@ -263,3 +268,3 @@ condition: "operation.type === type",

},
66: {
67: {
file: "@apollo/client/testing/core/mocking/mockLink.js",

@@ -269,3 +274,3 @@ condition: "queryWithoutClientOnlyDirectives",

},
67: {
68: {
file: "@apollo/client/testing/core/mocking/mockLink.js",

@@ -275,3 +280,3 @@ condition: "mockedResponse.maxUsageCount > 0",

},
68: {
69: {
file: "@apollo/client/utilities/graphql/DocumentTransform.js",

@@ -281,3 +286,3 @@ condition: "Array.isArray(cacheKeys)",

},
69: {
70: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -287,3 +292,3 @@ condition: "evaledValue !== void 0",

},
70: {
71: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -293,3 +298,3 @@ condition: "directiveArguments && directiveArguments.length === 1",

},
71: {
72: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -299,3 +304,3 @@ condition: "ifArgument.name && ifArgument.name.value === \"if\"",

},
72: {
73: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -305,3 +310,3 @@ condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",

},
73: {
74: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -311,3 +316,3 @@ message: "Found a %s operation%s. " +

},
74: {
75: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -317,3 +322,3 @@ condition: "fragments.length === 1",

},
75: {
76: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -323,3 +328,3 @@ condition: "fragment",

},
76: {
77: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -329,7 +334,7 @@ condition: "doc && doc.kind === \"Document\"",

},
77: {
78: {
file: "@apollo/client/utilities/graphql/getFromAST.js",
message: "Schema type definitions not allowed in queries. Found: \"%s\""
},
78: {
79: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -339,3 +344,3 @@ condition: "operations.length <= 1",

},
79: {
80: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -345,3 +350,3 @@ condition: "queryDef && queryDef.operation === \"query\"",

},
80: {
81: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -351,3 +356,3 @@ condition: "doc.kind === \"Document\"",

},
81: {
82: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -357,3 +362,3 @@ condition: "doc.definitions.length <= 1",

},
82: {
83: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -363,7 +368,7 @@ condition: "fragmentDef.kind === \"FragmentDefinition\"",

},
83: {
84: {
file: "@apollo/client/utilities/graphql/getFromAST.js",
message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
},
84: {
85: {
file: "@apollo/client/utilities/graphql/storeUtils.js",

@@ -380,3 +385,3 @@ message: "The inline argument \"%s\" of kind \"%s\"" +

},
24: {
25: {
file: "@apollo/client/core/ObservableQuery.js",

@@ -415,43 +420,43 @@ message: "Missing cache result fields: %o"

},
33: {
34: {
file: "@apollo/client/core/QueryManager.js",
message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
},
34: {
35: {
file: "@apollo/client/core/QueryManager.js",
message: "Unknown query %o requested in refetchQueries options.include array"
},
35: {
36: {
file: "@apollo/client/link/core/ApolloLink.js",
message: "You are calling concat on a terminating link, which will have no effect %o"
},
38: {
39: {
file: "@apollo/client/link/http/createHttpLink.js",
message: "Multipart-subscriptions do not support @defer"
},
42: {
43: {
file: "@apollo/client/link/utils/toPromise.js",
message: "Promise Wrapper does not support multiple results from Observable"
},
52: {
53: {
file: "@apollo/client/react/hooks/useSubscription.js",
message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
},
53: {
54: {
file: "@apollo/client/react/hooks/useSubscription.js",
message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
},
54: {
55: {
file: "@apollo/client/react/hooks/useSubscription.js",
message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
},
55: {
56: {
file: "@apollo/client/react/hooks/useSubscription.js",
message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
},
58: {
59: {
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."
},
86: {
87: {
file: "@apollo/client/utilities/graphql/transform.js",

@@ -467,15 +472,15 @@ message: "Removing an @connection directive even though it does not have a key. " +

},
21: {
22: {
file: "@apollo/client/core/ObservableQuery.js",
message: "Unhandled GraphQL subscription error"
},
23: {
24: {
file: "@apollo/client/core/ObservableQuery.js",
message: "Unhandled error"
},
59: {
60: {
file: "@apollo/client/react/hooks/useSyncExternalStore.js",
message: "The result of getSnapshot should be cached to avoid an infinite loop"
},
85: {
86: {
file: "@apollo/client/utilities/graphql/transform.js",

@@ -486,3 +491,3 @@ message: "Could not find operation or fragment"

var version = "0.0.0-pr-11984-20240801210716";
var version = "0.0.0-pr-11990-20240805150134";

@@ -489,0 +494,0 @@ function maybe(thunk) {

@@ -79,4 +79,10 @@ export const errorCodes = // This file is used by the error message display website and the

22: {
21: {
file: "@apollo/client/core/ObservableQuery.js",
condition: "updateQuery",
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
},
23: {
file: "@apollo/client/core/ObservableQuery.js",
condition: "pollInterval",

@@ -86,3 +92,3 @@ message: "Attempted to start a polling query without a polling interval."

25: {
26: {
file: "@apollo/client/core/QueryManager.js",

@@ -92,3 +98,3 @@ message: "QueryManager stopped while query was in flight"

26: {
27: {
file: "@apollo/client/core/QueryManager.js",

@@ -99,3 +105,3 @@ condition: "mutation",

27: {
28: {
file: "@apollo/client/core/QueryManager.js",

@@ -106,3 +112,3 @@ condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",

28: {
29: {
file: "@apollo/client/core/QueryManager.js",

@@ -115,3 +121,3 @@ condition: "options.query",

29: {
30: {
file: "@apollo/client/core/QueryManager.js",

@@ -122,3 +128,3 @@ condition: "options.query.kind === \"Document\"",

30: {
31: {
file: "@apollo/client/core/QueryManager.js",

@@ -129,3 +135,3 @@ condition: "!options.returnPartialData",

31: {
32: {
file: "@apollo/client/core/QueryManager.js",

@@ -136,3 +142,3 @@ condition: "!options.pollInterval",

32: {
33: {
file: "@apollo/client/core/QueryManager.js",

@@ -142,3 +148,3 @@ message: "Store reset while query was in flight (not completed in link chain)"

36: {
37: {
file: "@apollo/client/link/core/ApolloLink.js",

@@ -148,3 +154,3 @@ message: "request is not implemented"

37: {
38: {
file: "@apollo/client/link/http/checkFetcher.js",

@@ -154,3 +160,3 @@ message: "\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "

39: {
40: {
file: "@apollo/client/link/http/serializeFetchParameter.js",

@@ -160,3 +166,3 @@ message: "Network request failed. %s is not serializable: %s"

40: {
41: {
file: "@apollo/client/link/persisted-queries/index.js",

@@ -170,3 +176,3 @@ condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",

41: {
42: {
file: "@apollo/client/link/persisted-queries/index.js",

@@ -177,3 +183,3 @@ condition: "forward",

43: {
44: {
file: "@apollo/client/link/utils/validateOperation.js",

@@ -183,3 +189,3 @@ message: "illegal argument: %s"

44: {
45: {
file: "@apollo/client/react/context/ApolloConsumer.js",

@@ -192,3 +198,3 @@ condition: "context && context.client",

45: {
46: {
file: "@apollo/client/react/context/ApolloContext.js",

@@ -204,3 +210,3 @@ condition: "\"createContext\" in React",

46: {
47: {
file: "@apollo/client/react/context/ApolloProvider.js",

@@ -213,3 +219,3 @@ condition: "context.client",

47: {
48: {
file: "@apollo/client/react/hoc/hoc-utils.js",

@@ -222,3 +228,3 @@ condition: "this.withRef",

48: {
49: {
file: "@apollo/client/react/hoc/withApollo.js",

@@ -231,3 +237,3 @@ condition: "operationOptions.withRef",

49: {
50: {
file: "@apollo/client/react/hooks/useApolloClient.js",

@@ -241,3 +247,3 @@ condition: "!!client",

50: {
51: {
file: "@apollo/client/react/hooks/useLoadableQuery.js",

@@ -248,3 +254,3 @@ condition: "!calledDuringRender()",

51: {
52: {
file: "@apollo/client/react/hooks/useLoadableQuery.js",

@@ -255,3 +261,3 @@ condition: "internalQueryRef",

56: {
57: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -262,3 +268,3 @@ condition: "!optionsRef.current.skip",

57: {
58: {
file: "@apollo/client/react/hooks/useSuspenseQuery.js",

@@ -269,3 +275,3 @@ condition: "supportedFetchPolicies.includes(fetchPolicy)",

60: {
61: {
file: "@apollo/client/react/internal/cache/QueryReference.js",

@@ -276,3 +282,3 @@ condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",

61: {
62: {
file: "@apollo/client/react/parser/index.js",

@@ -286,3 +292,3 @@ condition: "!!document && !!document.kind",

62: {
63: {
file: "@apollo/client/react/parser/index.js",

@@ -295,3 +301,3 @@ condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",

63: {
64: {
file: "@apollo/client/react/parser/index.js",

@@ -306,3 +312,3 @@ condition: "queries.length + mutations.length + subscriptions.length <= 1",

64: {
65: {
file: "@apollo/client/react/parser/index.js",

@@ -316,3 +322,3 @@ condition: "definitions.length === 1",

65: {
66: {
file: "@apollo/client/react/parser/index.js",

@@ -323,3 +329,3 @@ condition: "operation.type === type",

66: {
67: {
file: "@apollo/client/testing/core/mocking/mockLink.js",

@@ -330,3 +336,3 @@ condition: "queryWithoutClientOnlyDirectives",

67: {
68: {
file: "@apollo/client/testing/core/mocking/mockLink.js",

@@ -337,3 +343,3 @@ condition: "mockedResponse.maxUsageCount > 0",

68: {
69: {
file: "@apollo/client/utilities/graphql/DocumentTransform.js",

@@ -344,3 +350,3 @@ condition: "Array.isArray(cacheKeys)",

69: {
70: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -351,3 +357,3 @@ condition: "evaledValue !== void 0",

70: {
71: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -358,3 +364,3 @@ condition: "directiveArguments && directiveArguments.length === 1",

71: {
72: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -365,3 +371,3 @@ condition: "ifArgument.name && ifArgument.name.value === \"if\"",

72: {
73: {
file: "@apollo/client/utilities/graphql/directives.js",

@@ -372,3 +378,3 @@ condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",

73: {
74: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -380,3 +386,3 @@

74: {
75: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -387,3 +393,3 @@ condition: "fragments.length === 1",

75: {
76: {
file: "@apollo/client/utilities/graphql/fragments.js",

@@ -394,3 +400,3 @@ condition: "fragment",

76: {
77: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -401,3 +407,3 @@ condition: "doc && doc.kind === \"Document\"",

77: {
78: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -407,3 +413,3 @@ message: "Schema type definitions not allowed in queries. Found: \"%s\""

78: {
79: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -414,3 +420,3 @@ condition: "operations.length <= 1",

79: {
80: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -421,3 +427,3 @@ condition: "queryDef && queryDef.operation === \"query\"",

80: {
81: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -428,3 +434,3 @@ condition: "doc.kind === \"Document\"",

81: {
82: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -435,3 +441,3 @@ condition: "doc.definitions.length <= 1",

82: {
83: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -442,3 +448,3 @@ condition: "fragmentDef.kind === \"FragmentDefinition\"",

83: {
84: {
file: "@apollo/client/utilities/graphql/getFromAST.js",

@@ -448,3 +454,3 @@ message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."

84: {
85: {
file: "@apollo/client/utilities/graphql/storeUtils.js",

@@ -464,3 +470,3 @@

24: {
25: {
file: "@apollo/client/core/ObservableQuery.js",

@@ -509,3 +515,3 @@ message: "Missing cache result fields: %o"

33: {
34: {
file: "@apollo/client/core/QueryManager.js",

@@ -515,3 +521,3 @@ message: "Unknown query named \"%s\" requested in refetchQueries options.include array"

34: {
35: {
file: "@apollo/client/core/QueryManager.js",

@@ -521,3 +527,3 @@ message: "Unknown query %o requested in refetchQueries options.include array"

35: {
36: {
file: "@apollo/client/link/core/ApolloLink.js",

@@ -527,3 +533,3 @@ message: "You are calling concat on a terminating link, which will have no effect %o"

38: {
39: {
file: "@apollo/client/link/http/createHttpLink.js",

@@ -533,3 +539,3 @@ message: "Multipart-subscriptions do not support @defer"

42: {
43: {
file: "@apollo/client/link/utils/toPromise.js",

@@ -539,3 +545,3 @@ message: "Promise Wrapper does not support multiple results from Observable"

52: {
53: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -545,3 +551,3 @@ message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."

53: {
54: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -551,3 +557,3 @@ message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."

54: {
55: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -557,3 +563,3 @@ message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."

55: {
56: {
file: "@apollo/client/react/hooks/useSubscription.js",

@@ -563,3 +569,3 @@ message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."

58: {
59: {
file: "@apollo/client/react/hooks/useSuspenseQuery.js",

@@ -569,3 +575,3 @@ message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."

86: {
87: {
file: "@apollo/client/utilities/graphql/transform.js",

@@ -584,3 +590,3 @@

21: {
22: {
file: "@apollo/client/core/ObservableQuery.js",

@@ -590,3 +596,3 @@ message: "Unhandled GraphQL subscription error"

23: {
24: {
file: "@apollo/client/core/ObservableQuery.js",

@@ -596,3 +602,3 @@ message: "Unhandled error"

59: {
60: {
file: "@apollo/client/react/hooks/useSyncExternalStore.js",

@@ -602,3 +608,3 @@ message: "The result of getSnapshot should be cached to avoid an infinite loop"

85: {
86: {
file: "@apollo/client/utilities/graphql/transform.js",

@@ -605,0 +611,0 @@ message: "Could not find operation or fragment"

@@ -52,3 +52,3 @@ import { newInvariantError, invariant } from "../../utilities/globals/index.js";

if (isTerminating(firstLink)) {
globalThis.__DEV__ !== false && invariant.warn(35, firstLink);
globalThis.__DEV__ !== false && invariant.warn(36, firstLink);
return firstLink;

@@ -79,3 +79,3 @@ }

ApolloLink.prototype.request = function (operation, forward) {
throw newInvariantError(36);
throw newInvariantError(37);
};

@@ -82,0 +82,0 @@ ApolloLink.prototype.onError = function (error, observer) {

@@ -57,3 +57,3 @@ 'use strict';

if (isTerminating(firstLink)) {
globalThis.__DEV__ !== false && globals.invariant.warn(35, firstLink);
globalThis.__DEV__ !== false && globals.invariant.warn(36, firstLink);
return firstLink;

@@ -84,3 +84,3 @@ }

ApolloLink.prototype.request = function (operation, forward) {
throw globals.newInvariantError(36);
throw globals.newInvariantError(37);
};

@@ -87,0 +87,0 @@ ApolloLink.prototype.onError = function (error, observer) {

import { newInvariantError } from "../../utilities/globals/index.js";
export var checkFetcher = function (fetcher) {
if (!fetcher && typeof fetch === "undefined") {
throw newInvariantError(37);
throw newInvariantError(38);
}
};
//# sourceMappingURL=checkFetcher.js.map

@@ -93,3 +93,3 @@ import { __assign, __rest } from "tslib";

if (isSubscription && hasDefer) {
globalThis.__DEV__ !== false && invariant.warn(38);
globalThis.__DEV__ !== false && invariant.warn(39);
}

@@ -96,0 +96,0 @@ if (isSubscription) {

@@ -334,3 +334,3 @@ 'use strict';

catch (e) {
var parseError = globals.newInvariantError(39, label, e.message);
var parseError = globals.newInvariantError(40, label, e.message);
parseError.parseError = e;

@@ -421,3 +421,3 @@ throw parseError;

if (!fetcher && typeof fetch === "undefined") {
throw globals.newInvariantError(37);
throw globals.newInvariantError(38);
}

@@ -556,3 +556,3 @@ };

if (isSubscription && hasDefer) {
globalThis.__DEV__ !== false && globals.invariant.warn(38);
globalThis.__DEV__ !== false && globals.invariant.warn(39);
}

@@ -559,0 +559,0 @@ if (isSubscription) {

@@ -8,3 +8,3 @@ import { newInvariantError } from "../../utilities/globals/index.js";

catch (e) {
var parseError = newInvariantError(39, label, e.message);
var parseError = newInvariantError(40, label, e.message);
parseError.parseError = e;

@@ -11,0 +11,0 @@ throw parseError;

@@ -52,3 +52,3 @@ import { __assign } from "tslib";

(typeof options.sha256 === "function" ||
typeof options.generateHash === "function"), 40);
typeof options.generateHash === "function"), 41);
var _a = compact(defaultOptions, options), sha256 = _a.sha256,

@@ -88,3 +88,3 @@ // If both a `sha256` and `generateHash` option are provided, the

return Object.assign(new ApolloLink(function (operation, forward) {
invariant(forward, 41);
invariant(forward, 42);
var query = operation.query;

@@ -91,0 +91,0 @@ return new Observable(function (observer) {

@@ -48,3 +48,3 @@ 'use strict';

(typeof options.sha256 === "function" ||
typeof options.generateHash === "function"), 40);
typeof options.generateHash === "function"), 41);
var _a = utilities.compact(defaultOptions, options), sha256 = _a.sha256,

@@ -73,3 +73,3 @@ _b = _a.generateHash,

return Object.assign(new core.ApolloLink(function (operation, forward) {
globals.invariant(forward, 41);
globals.invariant(forward, 42);
var query = operation.query;

@@ -76,0 +76,0 @@ return new utilities.Observable(function (observer) {

@@ -8,3 +8,3 @@ import { invariant } from "../../utilities/globals/index.js";

if (completed) {
globalThis.__DEV__ !== false && invariant.warn(42);
globalThis.__DEV__ !== false && invariant.warn(43);
}

@@ -11,0 +11,0 @@ else {

@@ -22,3 +22,3 @@ 'use strict';

if (completed) {
globalThis.__DEV__ !== false && globals.invariant.warn(42);
globalThis.__DEV__ !== false && globals.invariant.warn(43);
}

@@ -66,3 +66,3 @@ else {

if (OPERATION_FIELDS.indexOf(key) < 0) {
throw globals.newInvariantError(43, key);
throw globals.newInvariantError(44, key);
}

@@ -69,0 +69,0 @@ }

@@ -13,3 +13,3 @@ import { newInvariantError } from "../../utilities/globals/index.js";

if (OPERATION_FIELDS.indexOf(key) < 0) {
throw newInvariantError(43, key);
throw newInvariantError(44, key);
}

@@ -16,0 +16,0 @@ }

{
"name": "@apollo/client",
"version": "0.0.0-pr-11984-20240801210716",
"version": "0.0.0-pr-11990-20240805150134",
"description": "A fully-featured caching GraphQL client.",

@@ -5,0 +5,0 @@ "private": false,

@@ -7,3 +7,3 @@ import { invariant } from "../../utilities/globals/index.js";

return (React.createElement(ApolloContext.Consumer, null, function (context) {
invariant(context && context.client, 44);
invariant(context && context.client, 45);
return props.children(context.client);

@@ -10,0 +10,0 @@ }));

@@ -10,3 +10,3 @@ import * as React from "rehackt";

export function getApolloContext() {
invariant("createContext" in React, 45);
invariant("createContext" in React, 46);
var context = React.createContext[contextKey];

@@ -13,0 +13,0 @@ if (!context) {

@@ -12,5 +12,5 @@ import { __assign } from "tslib";

}, [parentContext, client]);
invariant(context.client, 46);
invariant(context.client, 47);
return (React.createElement(ApolloContext.Provider, { value: context }, children));
};
//# sourceMappingURL=ApolloProvider.js.map

@@ -26,3 +26,3 @@ 'use strict';

function getApolloContext() {
globals.invariant("createContext" in React__namespace, 45);
globals.invariant("createContext" in React__namespace, 46);
var context = React__namespace.createContext[contextKey];

@@ -45,3 +45,3 @@ if (!context) {

return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
globals.invariant(context && context.client, 44);
globals.invariant(context && context.client, 45);
return props.children(context.client);

@@ -58,3 +58,3 @@ }));

}, [parentContext, client]);
globals.invariant(context.client, 46);
globals.invariant(context.client, 47);
return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));

@@ -61,0 +61,0 @@ };

@@ -39,3 +39,3 @@ import { __extends } from "tslib";

GraphQLBase.prototype.getWrappedInstance = function () {
invariant(this.withRef, 47);
invariant(this.withRef, 48);
return this.wrappedInstance;

@@ -42,0 +42,0 @@ };

@@ -62,3 +62,3 @@ 'use strict';

GraphQLBase.prototype.getWrappedInstance = function () {
globals.invariant(this.withRef, 47);
globals.invariant(this.withRef, 48);
return this.wrappedInstance;

@@ -289,3 +289,3 @@ };

WithApollo.prototype.getWrappedInstance = function () {
globals.invariant(operationOptions.withRef, 48);
globals.invariant(operationOptions.withRef, 49);
return this.wrappedInstance;

@@ -292,0 +292,0 @@ };

@@ -25,3 +25,3 @@ import { __assign, __extends } from "tslib";

WithApollo.prototype.getWrappedInstance = function () {
invariant(operationOptions.withRef, 48);
invariant(operationOptions.withRef, 49);
return this.wrappedInstance;

@@ -28,0 +28,0 @@ };

@@ -37,3 +37,3 @@ 'use strict';

var client = override || context$1.client;
globals.invariant(!!client, 49);
globals.invariant(!!client, 50);
return client;

@@ -53,3 +53,3 @@ }

didWarnUncachedGetSnapshot = true;
globalThis.__DEV__ !== false && globals.invariant.error(59);
globalThis.__DEV__ !== false && globals.invariant.error(60);
}

@@ -666,6 +666,6 @@ var _a = React__namespace.useState({

if (options.onSubscriptionData) {
globalThis.__DEV__ !== false && globals.invariant.warn(options.onData ? 52 : 53);
globalThis.__DEV__ !== false && globals.invariant.warn(options.onData ? 53 : 54);
}
if (options.onSubscriptionComplete) {
globalThis.__DEV__ !== false && globals.invariant.warn(options.onComplete ? 54 : 55);
globalThis.__DEV__ !== false && globals.invariant.warn(options.onComplete ? 55 : 56);
}

@@ -791,3 +791,3 @@ }

return React__namespace.useMemo(function () { return (tslib.__assign(tslib.__assign({}, ret), { restart: function () {
globals.invariant(!optionsRef.current.skip, 56);
globals.invariant(!optionsRef.current.skip, 57);
setObservable(recreateRef.current());

@@ -968,7 +968,7 @@ } })); }, [ret]);

];
globals.invariant(supportedFetchPolicies.includes(fetchPolicy), 57, fetchPolicy);
globals.invariant(supportedFetchPolicies.includes(fetchPolicy), 58, fetchPolicy);
}
function validatePartialDataReturn(fetchPolicy, returnPartialData) {
if (fetchPolicy === "no-cache" && returnPartialData) {
globalThis.__DEV__ !== false && globals.invariant.warn(58);
globalThis.__DEV__ !== false && globals.invariant.warn(59);
}

@@ -1093,3 +1093,3 @@ }

}
globals.invariant(!calledDuringRender(), 50);
globals.invariant(!calledDuringRender(), 51);
var variables = args[0];

@@ -1113,3 +1113,3 @@ var cacheKey = tslib.__spreadArray([

var subscribeToMore = React__namespace.useCallback(function (options) {
globals.invariant(internalQueryRef, 51);
globals.invariant(internalQueryRef, 52);
return internalQueryRef.observable.subscribeToMore(options);

@@ -1116,0 +1116,0 @@ }, [internalQueryRef]);

@@ -22,5 +22,5 @@ import { invariant } from "../../utilities/globals/index.js";

var client = override || context.client;
invariant(!!client, 49);
invariant(!!client, 50);
return client;
}
//# sourceMappingURL=useApolloClient.js.map

@@ -44,3 +44,3 @@ import { __assign, __spreadArray } from "tslib";

}
invariant(!calledDuringRender(), 50);
invariant(!calledDuringRender(), 51);
var variables = args[0];

@@ -64,3 +64,3 @@ var cacheKey = __spreadArray([

var subscribeToMore = React.useCallback(function (options) {
invariant(internalQueryRef, 51);
invariant(internalQueryRef, 52);
return internalQueryRef.observable.subscribeToMore(options);

@@ -67,0 +67,0 @@ }, [internalQueryRef]);

@@ -101,6 +101,6 @@ import { __assign } from "tslib";

if (options.onSubscriptionData) {
globalThis.__DEV__ !== false && invariant.warn(options.onData ? 52 : 53);
globalThis.__DEV__ !== false && invariant.warn(options.onData ? 53 : 54);
}
if (options.onSubscriptionComplete) {
globalThis.__DEV__ !== false && invariant.warn(options.onComplete ? 54 : 55);
globalThis.__DEV__ !== false && invariant.warn(options.onComplete ? 55 : 56);
}

@@ -239,3 +239,3 @@ }

return React.useMemo(function () { return (__assign(__assign({}, ret), { restart: function () {
invariant(!optionsRef.current.skip, 56);
invariant(!optionsRef.current.skip, 57);
setObservable(recreateRef.current());

@@ -242,0 +242,0 @@ } })); }, [ret]);

@@ -100,7 +100,7 @@ import { __assign, __spreadArray } from "tslib";

];
invariant(supportedFetchPolicies.includes(fetchPolicy), 57, fetchPolicy);
invariant(supportedFetchPolicies.includes(fetchPolicy), 58, fetchPolicy);
}
function validatePartialDataReturn(fetchPolicy, returnPartialData) {
if (fetchPolicy === "no-cache" && returnPartialData) {
globalThis.__DEV__ !== false && invariant.warn(58);
globalThis.__DEV__ !== false && invariant.warn(59);
}

@@ -107,0 +107,0 @@ }

@@ -29,3 +29,3 @@ import { invariant } from "../../utilities/globals/index.js";

// DEVIATION: Using invariant.error instead of console.error directly.
globalThis.__DEV__ !== false && invariant.error(59);
globalThis.__DEV__ !== false && invariant.error(60);
}

@@ -32,0 +32,0 @@ // Because updates are synchronous, we don't queue them. Instead we force a

@@ -32,3 +32,3 @@ import { __assign } from "tslib";

export function assertWrappedQueryRef(queryRef) {
invariant(!queryRef || QUERY_REFERENCE_SYMBOL in queryRef, 60);
invariant(!queryRef || QUERY_REFERENCE_SYMBOL in queryRef, 61);
}

@@ -35,0 +35,0 @@ export function getWrappedPromise(queryRef) {

@@ -11,3 +11,3 @@ 'use strict';

var version = "0.0.0-pr-11984-20240801210716";
var version = "0.0.0-pr-11990-20240805150134";

@@ -122,3 +122,3 @@ function maybe(thunk) {

function assertWrappedQueryRef(queryRef) {
invariant(!queryRef || QUERY_REFERENCE_SYMBOL in queryRef, 60);
invariant(!queryRef || QUERY_REFERENCE_SYMBOL in queryRef, 61);
}

@@ -125,0 +125,0 @@ function getWrappedPromise(queryRef) {

@@ -35,3 +35,3 @@ import { invariant } from "../../utilities/globals/index.js";

var variables, type, name;
invariant(!!document && !!document.kind, 61, document);
invariant(!!document && !!document.kind, 62, document);
var fragments = [];

@@ -64,6 +64,6 @@ var queries = [];

mutations.length ||
subscriptions.length, 62);
subscriptions.length, 63);
invariant(
queries.length + mutations.length + subscriptions.length <= 1,
63,
64,
document,

@@ -80,3 +80,3 @@ queries.length,

: subscriptions;
invariant(definitions.length === 1, 64, document, definitions.length);
invariant(definitions.length === 1, 65, document, definitions.length);
var definition = definitions[0];

@@ -106,3 +106,3 @@ variables = definition.variableDefinitions || [];

operation.type === type,
65,
66,
requiredOperationName,

@@ -109,0 +109,0 @@ requiredOperationName,

@@ -44,3 +44,3 @@ 'use strict';

var variables, type, name;
globals.invariant(!!document && !!document.kind, 61, document);
globals.invariant(!!document && !!document.kind, 62, document);
var fragments = [];

@@ -73,6 +73,6 @@ var queries = [];

mutations.length ||
subscriptions.length, 62);
subscriptions.length, 63);
globals.invariant(
queries.length + mutations.length + subscriptions.length <= 1,
63,
64,
document,

@@ -89,3 +89,3 @@ queries.length,

: subscriptions;
globals.invariant(definitions.length === 1, 64, document, definitions.length);
globals.invariant(definitions.length === 1, 65, document, definitions.length);
var definition = definitions[0];

@@ -115,3 +115,3 @@ variables = definition.variableDefinitions || [];

operation.type === type,
65,
66,
requiredOperationName,

@@ -118,0 +118,0 @@ requiredOperationName,

@@ -133,3 +133,3 @@ 'use strict';

var queryWithoutClientOnlyDirectives = utilities.removeDirectivesFromDocument([{ name: "connection" }, { name: "nonreactive" }], utilities.checkDocument(newMockedResponse.request.query));
globals.invariant(queryWithoutClientOnlyDirectives, 66);
globals.invariant(queryWithoutClientOnlyDirectives, 67);
newMockedResponse.request.query = queryWithoutClientOnlyDirectives;

@@ -141,3 +141,3 @@ var query = utilities.removeClientSetsFromDocument(newMockedResponse.request.query);

mockedResponse.maxUsageCount = (_a = mockedResponse.maxUsageCount) !== null && _a !== void 0 ? _a : 1;
globals.invariant(mockedResponse.maxUsageCount > 0, 67, mockedResponse.maxUsageCount);
globals.invariant(mockedResponse.maxUsageCount > 0, 68, mockedResponse.maxUsageCount);
this.normalizeVariableMatching(newMockedResponse);

@@ -144,0 +144,0 @@ return newMockedResponse;

@@ -135,3 +135,3 @@ import { __assign, __extends } from "tslib";

var queryWithoutClientOnlyDirectives = removeDirectivesFromDocument([{ name: "connection" }, { name: "nonreactive" }], checkDocument(newMockedResponse.request.query));
invariant(queryWithoutClientOnlyDirectives, 66);
invariant(queryWithoutClientOnlyDirectives, 67);
newMockedResponse.request.query = queryWithoutClientOnlyDirectives;

@@ -143,3 +143,3 @@ var query = removeClientSetsFromDocument(newMockedResponse.request.query);

mockedResponse.maxUsageCount = (_a = mockedResponse.maxUsageCount) !== null && _a !== void 0 ? _a : 1;
invariant(mockedResponse.maxUsageCount > 0, 67, mockedResponse.maxUsageCount);
invariant(mockedResponse.maxUsageCount > 0, 68, mockedResponse.maxUsageCount);
this.normalizeVariableMatching(newMockedResponse);

@@ -146,0 +146,0 @@ return newMockedResponse;

@@ -39,4 +39,9 @@ import { ApolloLink } from "../../../core/index.js";

link: ApolloLink;
data: {
__typename: string;
letter: string;
position: number;
}[];
};
export {};
//# sourceMappingURL=index.d.ts.map

@@ -45,5 +45,5 @@ import { __makeTemplateObject, __spreadArray } from "tslib";

});
return { query: query, link: link };
return { query: query, link: link, data: data };
}
var templateObject_1, templateObject_2, templateObject_3;
//# sourceMappingURL=index.js.map

@@ -7,3 +7,3 @@ 'use strict';

var version = "0.0.0-pr-11984-20240801210716";
var version = "0.0.0-pr-11990-20240805150134";

@@ -10,0 +10,0 @@ function maybe(thunk) {

@@ -14,3 +14,3 @@ import { invariant } from "../globals/index.js";

variables && variables[ifArgument.value.name.value];
invariant(evaledValue !== void 0, 69, directive.name.value);
invariant(evaledValue !== void 0, 70, directive.name.value);
}

@@ -67,9 +67,9 @@ else {

var directiveName = directive.name.value;
invariant(directiveArguments && directiveArguments.length === 1, 70, directiveName);
invariant(directiveArguments && directiveArguments.length === 1, 71, directiveName);
var ifArgument = directiveArguments[0];
invariant(ifArgument.name && ifArgument.name.value === "if", 71, directiveName);
invariant(ifArgument.name && ifArgument.name.value === "if", 72, directiveName);
var ifValue = ifArgument.value;
// means it has to be a variable value if this is a valid @skip or @include directive
invariant(ifValue &&
(ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 72, directiveName);
(ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 73, directiveName);
result.push({ directive: directive, ifArgument: ifArgument });

@@ -76,0 +76,0 @@ });

@@ -57,3 +57,3 @@ import { Trie } from "@wry/trie";

if (cacheKeys) {
invariant(Array.isArray(cacheKeys), 68);
invariant(Array.isArray(cacheKeys), 69);
return stableCacheKeys_1.lookupArray(cacheKeys);

@@ -60,0 +60,0 @@ }

@@ -36,3 +36,3 @@ import { __assign, __spreadArray } from "tslib";

throw newInvariantError(
73,
74,
definition.operation,

@@ -51,3 +51,3 @@ definition.name ? " named '".concat(definition.name.value, "'") : ""

if (typeof actualFragmentName === "undefined") {
invariant(fragments.length === 1, 74, fragments.length);
invariant(fragments.length === 1, 75, fragments.length);
actualFragmentName = fragments[0].name.value;

@@ -98,3 +98,3 @@ }

var fragment = fragmentMap && fragmentMap[fragmentName];
invariant(fragment, 75, fragmentName);
invariant(fragment, 76, fragmentName);
return fragment || null;

@@ -101,0 +101,0 @@ }

@@ -5,3 +5,3 @@ import { invariant, newInvariantError } from "../globals/index.js";

export function checkDocument(doc) {
invariant(doc && doc.kind === "Document", 76);
invariant(doc && doc.kind === "Document", 77);
var operations = doc.definitions

@@ -11,7 +11,7 @@ .filter(function (d) { return d.kind !== "FragmentDefinition"; })

if (definition.kind !== "OperationDefinition") {
throw newInvariantError(77, definition.kind);
throw newInvariantError(78, definition.kind);
}
return definition;
});
invariant(operations.length <= 1, 78, operations.length);
invariant(operations.length <= 1, 79, operations.length);
return doc;

@@ -40,10 +40,10 @@ }

var queryDef = getOperationDefinition(doc);
invariant(queryDef && queryDef.operation === "query", 79);
invariant(queryDef && queryDef.operation === "query", 80);
return queryDef;
}
export function getFragmentDefinition(doc) {
invariant(doc.kind === "Document", 80);
invariant(doc.definitions.length <= 1, 81);
invariant(doc.kind === "Document", 81);
invariant(doc.definitions.length <= 1, 82);
var fragmentDef = doc.definitions[0];
invariant(fragmentDef.kind === "FragmentDefinition", 82);
invariant(fragmentDef.kind === "FragmentDefinition", 83);
return fragmentDef;

@@ -78,3 +78,3 @@ }

}
throw newInvariantError(83);
throw newInvariantError(84);
}

@@ -81,0 +81,0 @@ export function getDefaultValues(definition) {

@@ -75,3 +75,3 @@ import { newInvariantError } from "../globals/index.js";

else {
throw newInvariantError(84, name.value, value.kind);
throw newInvariantError(85, name.value, value.kind);
}

@@ -78,0 +78,0 @@ }

@@ -90,3 +90,3 @@ import { __assign, __spreadArray } from "tslib";

}
globalThis.__DEV__ !== false && invariant.error(85);
globalThis.__DEV__ !== false && invariant.error(86);
return null;

@@ -357,3 +357,3 @@ };

!directive.arguments.some(function (arg) { return arg.name.value === "key"; })) {
globalThis.__DEV__ !== false && invariant.warn(86);
globalThis.__DEV__ !== false && invariant.warn(87);
}

@@ -360,0 +360,0 @@ }

@@ -25,3 +25,3 @@ 'use strict';

variables && variables[ifArgument.value.name.value];
globals.invariant(evaledValue !== void 0, 69, directive.name.value);
globals.invariant(evaledValue !== void 0, 70, directive.name.value);
}

@@ -76,8 +76,8 @@ else {

var directiveName = directive.name.value;
globals.invariant(directiveArguments && directiveArguments.length === 1, 70, directiveName);
globals.invariant(directiveArguments && directiveArguments.length === 1, 71, directiveName);
var ifArgument = directiveArguments[0];
globals.invariant(ifArgument.name && ifArgument.name.value === "if", 71, directiveName);
globals.invariant(ifArgument.name && ifArgument.name.value === "if", 72, directiveName);
var ifValue = ifArgument.value;
globals.invariant(ifValue &&
(ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 72, directiveName);
(ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 73, directiveName);
result.push({ directive: directive, ifArgument: ifArgument });

@@ -116,3 +116,3 @@ });

throw globals.newInvariantError(
73,
74,
definition.operation,

@@ -127,3 +127,3 @@ definition.name ? " named '".concat(definition.name.value, "'") : ""

if (typeof actualFragmentName === "undefined") {
globals.invariant(fragments.length === 1, 74, fragments.length);
globals.invariant(fragments.length === 1, 75, fragments.length);
actualFragmentName = fragments[0].name.value;

@@ -169,3 +169,3 @@ }

var fragment = fragmentMap && fragmentMap[fragmentName];
globals.invariant(fragment, 75, fragmentName);
globals.invariant(fragment, 76, fragmentName);
return fragment || null;

@@ -329,3 +329,3 @@ }

else {
throw globals.newInvariantError(84, name.value, value.kind);
throw globals.newInvariantError(85, name.value, value.kind);
}

@@ -464,3 +464,3 @@ }

function checkDocument(doc) {
globals.invariant(doc && doc.kind === "Document", 76);
globals.invariant(doc && doc.kind === "Document", 77);
var operations = doc.definitions

@@ -470,7 +470,7 @@ .filter(function (d) { return d.kind !== "FragmentDefinition"; })

if (definition.kind !== "OperationDefinition") {
throw globals.newInvariantError(77, definition.kind);
throw globals.newInvariantError(78, definition.kind);
}
return definition;
});
globals.invariant(operations.length <= 1, 78, operations.length);
globals.invariant(operations.length <= 1, 79, operations.length);
return doc;

@@ -498,10 +498,10 @@ }

var queryDef = getOperationDefinition(doc);
globals.invariant(queryDef && queryDef.operation === "query", 79);
globals.invariant(queryDef && queryDef.operation === "query", 80);
return queryDef;
}
function getFragmentDefinition(doc) {
globals.invariant(doc.kind === "Document", 80);
globals.invariant(doc.definitions.length <= 1, 81);
globals.invariant(doc.kind === "Document", 81);
globals.invariant(doc.definitions.length <= 1, 82);
var fragmentDef = doc.definitions[0];
globals.invariant(fragmentDef.kind === "FragmentDefinition", 82);
globals.invariant(fragmentDef.kind === "FragmentDefinition", 83);
return fragmentDef;

@@ -529,3 +529,3 @@ }

}
throw globals.newInvariantError(83);
throw globals.newInvariantError(84);
}

@@ -581,3 +581,3 @@ function getDefaultValues(definition) {

if (cacheKeys) {
globals.invariant(Array.isArray(cacheKeys), 68);
globals.invariant(Array.isArray(cacheKeys), 69);
return stableCacheKeys_1.lookupArray(cacheKeys);

@@ -712,3 +712,3 @@ }

}
globalThis.__DEV__ !== false && globals.invariant.error(85);
globalThis.__DEV__ !== false && globals.invariant.error(86);
return null;

@@ -903,3 +903,3 @@ };

!directive.arguments.some(function (arg) { return arg.name.value === "key"; })) {
globalThis.__DEV__ !== false && globals.invariant.warn(86);
globalThis.__DEV__ !== false && globals.invariant.warn(87);
}

@@ -906,0 +906,0 @@ }

@@ -1,2 +0,2 @@

export var version = "0.0.0-pr-11984-20240801210716";
export var version = "0.0.0-pr-11990-20240805150134";
//# sourceMappingURL=version.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc