@apollo/client 3.12.3 → 3.12.5

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.
@@ -21,7 +21,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
21
21
 
22
22
  var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
23
23
 
24
- var version = "3.12.3";
24
+ var version = "3.12.5";
25
25
 
26
26
  function isNonNullObject(obj) {
27
27
  return obj !== null && typeof obj === "object";
@@ -1517,15 +1517,19 @@ var QueryManager = (function () {
1517
1517
  var _this = this;
1518
1518
  if (include === void 0) { include = "active"; }
1519
1519
  var queries = new Map();
1520
- var queryNamesAndDocs = new Map();
1520
+ var queryNames = new Map();
1521
+ var queryNamesAndQueryStrings = new Map();
1521
1522
  var legacyQueryOptions = new Set();
1522
1523
  if (Array.isArray(include)) {
1523
1524
  include.forEach(function (desc) {
1524
1525
  if (typeof desc === "string") {
1525
- queryNamesAndDocs.set(desc, false);
1526
+ queryNames.set(desc, desc);
1527
+ queryNamesAndQueryStrings.set(desc, false);
1526
1528
  }
1527
1529
  else if (utilities.isDocumentNode(desc)) {
1528
- queryNamesAndDocs.set(_this.transform(desc), false);
1530
+ var queryString = utilities.print(_this.transform(desc));
1531
+ queryNames.set(queryString, utilities.getOperationName(desc));
1532
+ queryNamesAndQueryStrings.set(queryString, false);
1529
1533
  }
1530
1534
  else if (utilities.isNonNullObject(desc) && desc.query) {
1531
1535
  legacyQueryOptions.add(desc);
@@ -1545,13 +1549,13 @@ var QueryManager = (function () {
1545
1549
  return;
1546
1550
  }
1547
1551
  if (include === "active" ||
1548
- (queryName && queryNamesAndDocs.has(queryName)) ||
1549
- (document && queryNamesAndDocs.has(document))) {
1552
+ (queryName && queryNamesAndQueryStrings.has(queryName)) ||
1553
+ (document && queryNamesAndQueryStrings.has(utilities.print(document)))) {
1550
1554
  queries.set(queryId, oq);
1551
1555
  if (queryName)
1552
- queryNamesAndDocs.set(queryName, true);
1556
+ queryNamesAndQueryStrings.set(queryName, true);
1553
1557
  if (document)
1554
- queryNamesAndDocs.set(document, true);
1558
+ queryNamesAndQueryStrings.set(utilities.print(document), true);
1555
1559
  }
1556
1560
  }
1557
1561
  });
@@ -1572,10 +1576,16 @@ var QueryManager = (function () {
1572
1576
  queries.set(queryId, oq);
1573
1577
  });
1574
1578
  }
1575
- if (globalThis.__DEV__ !== false && queryNamesAndDocs.size) {
1576
- queryNamesAndDocs.forEach(function (included, nameOrDoc) {
1579
+ if (globalThis.__DEV__ !== false && queryNamesAndQueryStrings.size) {
1580
+ queryNamesAndQueryStrings.forEach(function (included, nameOrQueryString) {
1577
1581
  if (!included) {
1578
- globalThis.__DEV__ !== false && globals.invariant.warn(typeof nameOrDoc === "string" ? 35 : 36, nameOrDoc);
1582
+ var queryName = queryNames.get(nameOrQueryString);
1583
+ if (queryName) {
1584
+ globalThis.__DEV__ !== false && globals.invariant.warn(35, queryName);
1585
+ }
1586
+ else {
1587
+ globalThis.__DEV__ !== false && globals.invariant.warn(36);
1588
+ }
1579
1589
  }
1580
1590
  });
1581
1591
  }
package/dev/dev.cjs CHANGED
@@ -405,7 +405,7 @@ const devWarn = {
405
405
  },
406
406
  36: {
407
407
  file: "@apollo/client/core/QueryManager.js",
408
- message: "Unknown query %o requested in refetchQueries options.include array"
408
+ message: "Unknown anonymous query requested in refetchQueries options.include array"
409
409
  },
410
410
  37: {
411
411
  file: "@apollo/client/core/QueryManager.js",
@@ -492,7 +492,7 @@ const devError = {
492
492
  }
493
493
  };
494
494
 
495
- var version = "3.12.3";
495
+ var version = "3.12.5";
496
496
 
497
497
  function maybe(thunk) {
498
498
  try {
package/dev/dev.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dev.cjs","sources":["../invariantErrorCodes.js","../version.js","../utilities/globals/maybe.js","../utilities/globals/global.js","../utilities/common/makeUniqueId.js","../utilities/common/stringifyForDisplay.js","../utilities/globals/invariantWrappers.js","setErrorMessageHandler.js","loadErrorMessageHandler.js","loadDevMessages.js","loadErrorMessages.js"],"sourcesContent":["export const errorCodes = // This file is used by the error message display website and the\n// @apollo/client/includeErrors entry point.\n// This file is not meant to be imported manually.\n{\n 2: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n condition: \"typeof dataId === \\\"string\\\"\",\n message: \"store.merge expects a string ID\"\n },\n\n 5: {\n file: \"@apollo/client/cache/inmemory/key-extractor.js\",\n condition: \"extracted !== void 0\",\n message: \"Missing field '%s' while extracting keyFields from %s\"\n },\n\n 6: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n condition: \"!old || old === which\",\n message: \"Cannot change root %s __typename more than once\"\n },\n\n 9: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Cannot automatically merge arrays\"\n },\n\n 10: {\n file: \"@apollo/client/cache/inmemory/readFromStore.js\",\n message: \"No fragment named %s\"\n },\n\n 11: {\n file: \"@apollo/client/cache/inmemory/readFromStore.js\",\n condition: \"!isReference(value)\",\n message: \"Missing selection set for object of type %s returned for query field %s\"\n },\n\n 12: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Could not identify object %s\"\n },\n\n 14: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"No fragment named %s\"\n },\n\n 16: {\n file: \"@apollo/client/core/ApolloClient.js\",\n\n message: \"To initialize Apollo Client, you must specify a 'cache' property \" +\n \"in the options object. \\n\" +\n \"For more information, please visit: https://go.apollo.dev/c/docs\"\n },\n\n 17: {\n file: \"@apollo/client/core/ApolloClient.js\",\n condition: \"options.fetchPolicy !== \\\"cache-and-network\\\"\",\n\n message: \"The cache-and-network fetchPolicy does not work with client.query, because \" +\n \"client.query can only return a single result. Please use client.watchQuery \" +\n \"to receive multiple results from the cache and the network, or consider \" +\n \"using a different fetchPolicy, such as cache-first or network-only.\"\n },\n\n 19: {\n file: \"@apollo/client/core/LocalState.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 20: {\n file: \"@apollo/client/core/LocalState.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 22: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n condition: \"updateQuery\",\n message: \"You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy.\"\n },\n\n 24: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n condition: \"pollInterval\",\n message: \"Attempted to start a polling query without a polling interval.\"\n },\n\n 27: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"QueryManager stopped while query was in flight\"\n },\n\n 28: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"mutation\",\n message: \"mutation option is required. You must specify your GraphQL document in the mutation option.\"\n },\n\n 29: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"fetchPolicy === \\\"network-only\\\" || fetchPolicy === \\\"no-cache\\\"\",\n message: \"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.\"\n },\n\n 30: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"options.query\",\n\n message: \"query option is required. You must specify your GraphQL document \" +\n \"in the query option.\"\n },\n\n 31: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"options.query.kind === \\\"Document\\\"\",\n message: 'You must wrap the query string in a \"gql\" tag.'\n },\n\n 32: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"!options.returnPartialData\",\n message: \"returnPartialData option only supported on watchQuery.\"\n },\n\n 33: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"!options.pollInterval\",\n message: \"pollInterval option only supported on watchQuery.\"\n },\n\n 34: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Store reset while query was in flight (not completed in link chain)\"\n },\n\n 39: {\n file: \"@apollo/client/link/core/ApolloLink.js\",\n message: \"request is not implemented\"\n },\n\n 40: {\n file: \"@apollo/client/link/http/checkFetcher.js\",\n 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 \"\n },\n\n 42: {\n file: \"@apollo/client/link/http/serializeFetchParameter.js\",\n message: \"Network request failed. %s is not serializable: %s\"\n },\n\n 43: {\n file: \"@apollo/client/link/persisted-queries/index.js\",\n condition: \"options &&\\n (typeof options.sha256 === \\\"function\\\" ||\\n typeof options.generateHash === \\\"function\\\")\",\n\n message: 'Missing/invalid \"sha256\" or \"generateHash\" function. Please ' +\n 'configure one using the \"createPersistedQueryLink(options)\" options ' +\n \"parameter.\"\n },\n\n 44: {\n file: \"@apollo/client/link/persisted-queries/index.js\",\n condition: \"forward\",\n message: \"PersistedQueryLink cannot be the last link in the chain.\"\n },\n\n 46: {\n file: \"@apollo/client/link/utils/validateOperation.js\",\n message: \"illegal argument: %s\"\n },\n\n 47: {\n file: \"@apollo/client/masking/maskDefinition.js\",\n condition: \"fragment\",\n message: \"Could not find fragment with name '%s'.\"\n },\n\n 49: {\n file: \"@apollo/client/masking/maskFragment.js\",\n condition: \"fragments.length === 1\",\n message: \"Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.\"\n },\n\n 50: {\n file: \"@apollo/client/masking/maskFragment.js\",\n condition: \"!!fragment\",\n message: \"Could not find fragment with name \\\"%s\\\".\"\n },\n\n 51: {\n file: \"@apollo/client/masking/maskOperation.js\",\n condition: \"definition\",\n message: \"Expected a parsed GraphQL document with a query, mutation, or subscription.\"\n },\n\n 53: {\n file: \"@apollo/client/react/context/ApolloConsumer.js\",\n condition: \"context && context.client\",\n\n message: 'Could not find \"client\" in the context of ApolloConsumer. ' +\n \"Wrap the root component in an <ApolloProvider>.\"\n },\n\n 54: {\n file: \"@apollo/client/react/context/ApolloContext.js\",\n condition: \"\\\"createContext\\\" in React\",\n\n message: \"Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\n\" +\n \"The Apollo Client functionality you are trying to use is only available in React Client Components.\\n\" +\n 'Please make sure to add \"use client\" at the top of your file.\\n' +\n // TODO: change to React documentation once React documentation contains information about Client Components\n \"For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components\"\n },\n\n 55: {\n file: \"@apollo/client/react/context/ApolloProvider.js\",\n condition: \"context.client\",\n\n message: \"ApolloProvider was not passed a client instance. Make \" +\n 'sure you pass in your client via the \"client\" prop.'\n },\n\n 56: {\n file: \"@apollo/client/react/hoc/hoc-utils.js\",\n condition: \"this.withRef\",\n\n message: \"To access the wrapped instance, you need to specify \" +\n \"{ withRef: true } in the options\"\n },\n\n 57: {\n file: \"@apollo/client/react/hoc/withApollo.js\",\n condition: \"operationOptions.withRef\",\n\n message: \"To access the wrapped instance, you need to specify \" +\n \"{ withRef: true } in the options\"\n },\n\n 58: {\n file: \"@apollo/client/react/hooks/useApolloClient.js\",\n condition: \"!!client\",\n\n message: 'Could not find \"client\" in the context or passed in as an option. ' +\n \"Wrap the root component in an <ApolloProvider>, or pass an ApolloClient \" +\n \"instance in via options.\"\n },\n\n 59: {\n file: \"@apollo/client/react/hooks/useLoadableQuery.js\",\n condition: \"!calledDuringRender()\",\n message: \"useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook.\"\n },\n\n 60: {\n file: \"@apollo/client/react/hooks/useLoadableQuery.js\",\n condition: \"internalQueryRef\",\n message: \"The query has not been loaded. Please load the query.\"\n },\n\n 65: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n condition: \"!optionsRef.current.skip\",\n message: \"A subscription that is skipped cannot be restarted.\"\n },\n\n 66: {\n file: \"@apollo/client/react/hooks/useSuspenseQuery.js\",\n condition: \"supportedFetchPolicies.includes(fetchPolicy)\",\n message: \"The fetch policy `%s` is not supported with suspense.\"\n },\n\n 69: {\n file: \"@apollo/client/react/internal/cache/QueryReference.js\",\n condition: \"!queryRef || QUERY_REFERENCE_SYMBOL in queryRef\",\n message: \"Expected a QueryRef object, but got something else instead.\"\n },\n\n 70: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"!!document && !!document.kind\",\n\n message: \"Argument of %s passed to parser was not a valid GraphQL \" +\n \"DocumentNode. You may need to use 'graphql-tag' or another method \" +\n \"to convert your operation into a document\"\n },\n\n 71: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"!fragments.length ||\\n queries.length ||\\n mutations.length ||\\n subscriptions.length\",\n\n message: \"Passing only a fragment to 'graphql' is not yet supported. \" +\n \"You must include a query, subscription or mutation as well\"\n },\n\n 72: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"queries.length + mutations.length + subscriptions.length <= 1\",\n\n message: \"react-apollo only supports a query, subscription, or a mutation per HOC. \" +\n \"%s had %s queries, %s \" +\n \"subscriptions and %s mutations. \" +\n \"You can use 'compose' to join multiple operation types to a component\"\n },\n\n 73: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"definitions.length === 1\",\n\n message: \"react-apollo only supports one definition per HOC. %s had \" +\n \"%s definitions. \" +\n \"You can use 'compose' to join multiple operation types to a component\"\n },\n\n 74: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"operation.type === type\",\n message: \"Running a %s requires a graphql \" + \"%s, but a %s was used instead.\"\n },\n\n 75: {\n file: \"@apollo/client/testing/core/mocking/mockLink.js\",\n condition: \"queryWithoutClientOnlyDirectives\",\n message: \"query is required\"\n },\n\n 76: {\n file: \"@apollo/client/testing/core/mocking/mockLink.js\",\n condition: \"mockedResponse.maxUsageCount > 0\",\n message: \"Mock response maxUsageCount must be greater than 0, %s given\"\n },\n\n 77: {\n file: \"@apollo/client/utilities/graphql/DocumentTransform.js\",\n condition: \"Array.isArray(cacheKeys)\",\n message: \"`getCacheKey` must return an array or undefined\"\n },\n\n 78: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"evaledValue !== void 0\",\n message: \"Invalid variable referenced in @%s directive.\"\n },\n\n 79: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"directiveArguments && directiveArguments.length === 1\",\n message: \"Incorrect number of arguments for the @%s directive.\"\n },\n\n 80: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"ifArgument.name && ifArgument.name.value === \\\"if\\\"\",\n message: \"Invalid argument for the @%s directive.\"\n },\n\n 81: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"ifValue &&\\n (ifValue.kind === \\\"Variable\\\" || ifValue.kind === \\\"BooleanValue\\\")\",\n message: \"Argument for the @%s directive must be a variable or a boolean value.\"\n },\n\n 85: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n\n message: \"Found a %s operation%s. \" +\n \"No operations are allowed when using a fragment as a query. Only fragments are allowed.\"\n },\n\n 86: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n condition: \"fragments.length === 1\",\n message: \"Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.\"\n },\n\n 87: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 88: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc && doc.kind === \\\"Document\\\"\",\n message: \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\"\n },\n\n 89: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n message: \"Schema type definitions not allowed in queries. Found: \\\"%s\\\"\"\n },\n\n 90: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"operations.length <= 1\",\n message: \"Ambiguous GraphQL document: contains %s operations\"\n },\n\n 91: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"queryDef && queryDef.operation === \\\"query\\\"\",\n message: \"Must contain a query definition.\"\n },\n\n 92: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc.kind === \\\"Document\\\"\",\n message: \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\"\n },\n\n 93: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc.definitions.length <= 1\",\n message: \"Fragment must have exactly one definition.\"\n },\n\n 94: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"fragmentDef.kind === \\\"FragmentDefinition\\\"\",\n message: \"Must be a fragment definition.\"\n },\n\n 95: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n message: \"Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.\"\n },\n\n 96: {\n file: \"@apollo/client/utilities/graphql/storeUtils.js\",\n\n message: \"The inline argument \\\"%s\\\" of kind \\\"%s\\\"\" +\n \"is not supported. Use variables instead of inline arguments to \" +\n \"overcome this limitation.\"\n }\n};\n\nexport const devDebug = {\n 18: {\n file: \"@apollo/client/core/ApolloClient.js\",\n message: \"In client.refetchQueries, Promise.all promise rejected with error %o\"\n },\n\n 26: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Missing cache result fields: %o\"\n }\n};\n\nexport const devLog = {};\n\nexport const devWarn = {\n 1: {\n file: \"@apollo/client/cache/core/cache.js\",\n message: \"Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object.\"\n },\n\n 3: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n\n message: \"cache.modify: You are trying to write a Reference that is not part of the store: %o\\n\" +\n \"Please make sure to set the `mergeIntoStore` parameter to `true` when creating a Reference that is not part of the store yet:\\n\" +\n \"`toReference(object, true)`\"\n },\n\n 4: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n\n message: \"cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\\n\" +\n \"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`.\"\n },\n\n 7: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Inferring subtype %s of supertype %s\"\n },\n\n 8: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Undefined 'from' passed to readField with arguments %s\"\n },\n\n 15: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %o\\n incoming: %o\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n\"\n },\n\n 21: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Called refetch(%o) for query %o, which does not declare a $variables variable.\\nDid you mean to call refetch(variables) instead of refetch({ variables })?\"\n },\n\n 35: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Unknown query named \\\"%s\\\" requested in refetchQueries options.include array\"\n },\n\n 36: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Unknown query %o requested in refetchQueries options.include array\"\n },\n\n 37: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy \"no-cache\". Please add `@unmask` to each fragment spread to access the data.'\n },\n\n 38: {\n file: \"@apollo/client/link/core/ApolloLink.js\",\n message: \"You are calling concat on a terminating link, which will have no effect %o\"\n },\n\n 41: {\n file: \"@apollo/client/link/http/createHttpLink.js\",\n message: \"Multipart-subscriptions do not support @defer\"\n },\n\n 45: {\n file: \"@apollo/client/link/utils/toPromise.js\",\n message: \"Promise Wrapper does not support multiple results from Observable\"\n },\n\n 48: {\n file: \"@apollo/client/masking/maskDefinition.js\",\n message: \"Accessing unmasked field on %s at path '%s'. This field will not be available when masking is enabled. Please read the field from the fragment instead.\"\n },\n\n 52: {\n file: \"@apollo/client/masking/utils.js\",\n message: \"The configured cache does not support data masking which effectively disables it. Please use a cache that supports data masking or disable data masking to silence this warning.\"\n },\n\n 61: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.\"\n },\n\n 62: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead.\"\n },\n\n 63: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.\"\n },\n\n 64: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead.\"\n },\n\n 67: {\n file: \"@apollo/client/react/hooks/useSuspenseQuery.js\",\n 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.\"\n },\n\n 82: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument does not support variables.\"\n },\n\n 83: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument must be of type string.\"\n },\n\n 84: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument does not recognize value '%s'.\"\n },\n\n 98: {\n file: \"@apollo/client/utilities/graphql/transform.js\",\n\n message: \"Removing an @connection directive even though it does not have a key. \" +\n \"You may want to use the key parameter to specify a store key.\"\n }\n};\n\nexport const devError = {\n 13: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Missing field '%s' while writing result %o\"\n },\n\n 23: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Unhandled GraphQL subscription error\"\n },\n\n 25: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Unhandled error\"\n },\n\n 68: {\n file: \"@apollo/client/react/hooks/useSyncExternalStore.js\",\n message: \"The result of getSnapshot should be cached to avoid an infinite loop\"\n },\n\n 97: {\n file: \"@apollo/client/utilities/graphql/transform.js\",\n message: \"Could not find operation or fragment\"\n }\n};\n","export var version = \"3.12.3\";\n//# sourceMappingURL=version.js.map","export function maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n//# sourceMappingURL=maybe.js.map","import { maybe } from \"./maybe.js\";\nexport default (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || // We don't expect the Function constructor ever to be invoked at runtime, as\n// long as at least one of globalThis, window, self, or global is defined, so\n// we are under no obligation to make it easy for static analysis tools to\n// detect syntactic usage of the Function constructor. If you think you can\n// improve your static analysis to detect this obfuscation, think again. This\n// is an arms race you cannot win, at least not in JavaScript.\nmaybe(function () {\n return maybe.constructor(\"return this\")();\n}));\n//# sourceMappingURL=global.js.map","var prefixCounts = new Map();\n// These IDs won't be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nexport function makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return \"\".concat(prefix, \":\").concat(count, \":\").concat(Math.random().toString(36).slice(2));\n}\n//# sourceMappingURL=makeUniqueId.js.map","import { makeUniqueId } from \"./makeUniqueId.js\";\nexport function stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space)\n .split(JSON.stringify(undefId))\n .join(\"<undefined>\");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map","import { invariant as originalInvariant, InvariantError } from \"ts-invariant\";\nimport { version } from \"../../version.js\";\nimport global from \"./global.js\";\nimport { stringifyForDisplay } from \"../common/stringifyForDisplay.js\";\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof message === \"number\") {\n var arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn.apply(void 0, [message].concat(args));\n };\n}\nvar invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n originalInvariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));\n }\n}, {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n});\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for(\"ApolloErrorMessageHandler_\" + version);\nfunction stringify(arg) {\n if (typeof arg == \"string\") {\n return arg;\n }\n try {\n return stringifyForDisplay(arg, 2).slice(0, 1000);\n }\n catch (_a) {\n return \"<non-serializable>\";\n }\n}\nfunction getHandledErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return (global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return \"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#\".concat(encodeURIComponent(JSON.stringify({\n version: version,\n message: message,\n args: messageArgs.map(stringify),\n })));\n}\nexport { invariant, InvariantError, newInvariantError, ApolloErrorMessageHandler, };\n//# sourceMappingURL=invariantWrappers.js.map","import { global } from \"../utilities/globals/index.js\";\nimport { ApolloErrorMessageHandler } from \"../utilities/globals/invariantWrappers.js\";\n/**\n * Overrides the global \"Error Message Handler\" with a custom implementation.\n */\nexport function setErrorMessageHandler(handler) {\n global[ApolloErrorMessageHandler] = handler;\n}\n//# sourceMappingURL=setErrorMessageHandler.js.map","import { global } from \"../utilities/globals/index.js\";\nimport { ApolloErrorMessageHandler } from \"../utilities/globals/invariantWrappers.js\";\nimport { setErrorMessageHandler } from \"./setErrorMessageHandler.js\";\n/**\n * Injects Apollo Client's default error message handler into the application and\n * also loads the error codes that are passed in as arguments.\n */\nexport function loadErrorMessageHandler() {\n var errorCodes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n errorCodes[_i] = arguments[_i];\n }\n setErrorMessageHandler(handler);\n for (var _a = 0, errorCodes_1 = errorCodes; _a < errorCodes_1.length; _a++) {\n var codes = errorCodes_1[_a];\n Object.assign(handler, codes);\n }\n return handler;\n}\nvar handler = (function (message, args) {\n if (typeof message === \"number\") {\n var definition = global[ApolloErrorMessageHandler][message];\n if (!message || !(definition === null || definition === void 0 ? void 0 : definition.message))\n return;\n message = definition.message;\n }\n return args.reduce(function (msg, arg) { return msg.replace(/%[sdfo]/, String(arg)); }, String(message));\n});\n//# sourceMappingURL=loadErrorMessageHandler.js.map","import { devDebug, devError, devLog, devWarn } from \"../invariantErrorCodes.js\";\nimport { loadErrorMessageHandler } from \"./loadErrorMessageHandler.js\";\nexport function loadDevMessages() {\n loadErrorMessageHandler(devDebug, devError, devLog, devWarn);\n}\n//# sourceMappingURL=loadDevMessages.js.map","import { errorCodes } from \"../invariantErrorCodes.js\";\nimport { loadErrorMessageHandler } from \"./loadErrorMessageHandler.js\";\nexport function loadErrorMessages() {\n loadErrorMessageHandler(errorCodes);\n}\n//# sourceMappingURL=loadErrorMessages.js.map"],"names":["originalInvariant","global"],"mappings":";;;;;;;AAAO,MAAM,UAAU;AAGvB;AACA,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,8CAA8C;AACxD,IAAI,SAAS,EAAE,8BAA8B;AAC7C,IAAI,OAAO,EAAE,iCAAiC;AAC9C,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,SAAS,EAAE,sBAAsB;AACrC,IAAI,OAAO,EAAE,uDAAuD;AACpE,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,SAAS,EAAE,uBAAuB;AACtC,IAAI,OAAO,EAAE,iDAAiD;AAC9D,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,OAAO,EAAE,mCAAmC;AAChD,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,OAAO,EAAE,sBAAsB;AACnC,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,SAAS,EAAE,qBAAqB;AACpC,IAAI,OAAO,EAAE,yEAAyE;AACtF,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,+CAA+C;AACzD,IAAI,OAAO,EAAE,8BAA8B;AAC3C,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,+CAA+C;AACzD,IAAI,OAAO,EAAE,sBAAsB;AACnC,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,qCAAqC;AAE/C,IAAI,OAAO,EAAE,mEAAmE;AAChF,QAAQ,2BAA2B;AACnC,QAAQ,kEAAkE;AAC1E,GAAG;AAEH,EAAE,EAAE,E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ev.cjs","sources":["../invariantErrorCodes.js","../version.js","../utilities/globals/maybe.js","../utilities/globals/global.js","../utilities/common/makeUniqueId.js","../utilities/common/stringifyForDisplay.js","../utilities/globals/invariantWrappers.js","setErrorMessageHandler.js","loadErrorMessageHandler.js","loadDevMessages.js","loadErrorMessages.js"],"sourcesContent":["export const errorCodes = // This file is used by the error message display website and the\n// @apollo/client/includeErrors entry point.\n// This file is not meant to be imported manually.\n{\n 2: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n condition: \"typeof dataId === \\\"string\\\"\",\n message: \"store.merge expects a string ID\"\n },\n\n 5: {\n file: \"@apollo/client/cache/inmemory/key-extractor.js\",\n condition: \"extracted !== void 0\",\n message: \"Missing field '%s' while extracting keyFields from %s\"\n },\n\n 6: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n condition: \"!old || old === which\",\n message: \"Cannot change root %s __typename more than once\"\n },\n\n 9: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Cannot automatically merge arrays\"\n },\n\n 10: {\n file: \"@apollo/client/cache/inmemory/readFromStore.js\",\n message: \"No fragment named %s\"\n },\n\n 11: {\n file: \"@apollo/client/cache/inmemory/readFromStore.js\",\n condition: \"!isReference(value)\",\n message: \"Missing selection set for object of type %s returned for query field %s\"\n },\n\n 12: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Could not identify object %s\"\n },\n\n 14: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"No fragment named %s\"\n },\n\n 16: {\n file: \"@apollo/client/core/ApolloClient.js\",\n\n message: \"To initialize Apollo Client, you must specify a 'cache' property \" +\n \"in the options object. \\n\" +\n \"For more information, please visit: https://go.apollo.dev/c/docs\"\n },\n\n 17: {\n file: \"@apollo/client/core/ApolloClient.js\",\n condition: \"options.fetchPolicy !== \\\"cache-and-network\\\"\",\n\n message: \"The cache-and-network fetchPolicy does not work with client.query, because \" +\n \"client.query can only return a single result. Please use client.watchQuery \" +\n \"to receive multiple results from the cache and the network, or consider \" +\n \"using a different fetchPolicy, such as cache-first or network-only.\"\n },\n\n 19: {\n file: \"@apollo/client/core/LocalState.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 20: {\n file: \"@apollo/client/core/LocalState.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 22: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n condition: \"updateQuery\",\n message: \"You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy.\"\n },\n\n 24: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n condition: \"pollInterval\",\n message: \"Attempted to start a polling query without a polling interval.\"\n },\n\n 27: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"QueryManager stopped while query was in flight\"\n },\n\n 28: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"mutation\",\n message: \"mutation option is required. You must specify your GraphQL document in the mutation option.\"\n },\n\n 29: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"fetchPolicy === \\\"network-only\\\" || fetchPolicy === \\\"no-cache\\\"\",\n message: \"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.\"\n },\n\n 30: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"options.query\",\n\n message: \"query option is required. You must specify your GraphQL document \" +\n \"in the query option.\"\n },\n\n 31: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"options.query.kind === \\\"Document\\\"\",\n message: 'You must wrap the query string in a \"gql\" tag.'\n },\n\n 32: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"!options.returnPartialData\",\n message: \"returnPartialData option only supported on watchQuery.\"\n },\n\n 33: {\n file: \"@apollo/client/core/QueryManager.js\",\n condition: \"!options.pollInterval\",\n message: \"pollInterval option only supported on watchQuery.\"\n },\n\n 34: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Store reset while query was in flight (not completed in link chain)\"\n },\n\n 39: {\n file: \"@apollo/client/link/core/ApolloLink.js\",\n message: \"request is not implemented\"\n },\n\n 40: {\n file: \"@apollo/client/link/http/checkFetcher.js\",\n 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 \"\n },\n\n 42: {\n file: \"@apollo/client/link/http/serializeFetchParameter.js\",\n message: \"Network request failed. %s is not serializable: %s\"\n },\n\n 43: {\n file: \"@apollo/client/link/persisted-queries/index.js\",\n condition: \"options &&\\n (typeof options.sha256 === \\\"function\\\" ||\\n typeof options.generateHash === \\\"function\\\")\",\n\n message: 'Missing/invalid \"sha256\" or \"generateHash\" function. Please ' +\n 'configure one using the \"createPersistedQueryLink(options)\" options ' +\n \"parameter.\"\n },\n\n 44: {\n file: \"@apollo/client/link/persisted-queries/index.js\",\n condition: \"forward\",\n message: \"PersistedQueryLink cannot be the last link in the chain.\"\n },\n\n 46: {\n file: \"@apollo/client/link/utils/validateOperation.js\",\n message: \"illegal argument: %s\"\n },\n\n 47: {\n file: \"@apollo/client/masking/maskDefinition.js\",\n condition: \"fragment\",\n message: \"Could not find fragment with name '%s'.\"\n },\n\n 49: {\n file: \"@apollo/client/masking/maskFragment.js\",\n condition: \"fragments.length === 1\",\n message: \"Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.\"\n },\n\n 50: {\n file: \"@apollo/client/masking/maskFragment.js\",\n condition: \"!!fragment\",\n message: \"Could not find fragment with name \\\"%s\\\".\"\n },\n\n 51: {\n file: \"@apollo/client/masking/maskOperation.js\",\n condition: \"definition\",\n message: \"Expected a parsed GraphQL document with a query, mutation, or subscription.\"\n },\n\n 53: {\n file: \"@apollo/client/react/context/ApolloConsumer.js\",\n condition: \"context && context.client\",\n\n message: 'Could not find \"client\" in the context of ApolloConsumer. ' +\n \"Wrap the root component in an <ApolloProvider>.\"\n },\n\n 54: {\n file: \"@apollo/client/react/context/ApolloContext.js\",\n condition: \"\\\"createContext\\\" in React\",\n\n message: \"Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\n\" +\n \"The Apollo Client functionality you are trying to use is only available in React Client Components.\\n\" +\n 'Please make sure to add \"use client\" at the top of your file.\\n' +\n // TODO: change to React documentation once React documentation contains information about Client Components\n \"For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components\"\n },\n\n 55: {\n file: \"@apollo/client/react/context/ApolloProvider.js\",\n condition: \"context.client\",\n\n message: \"ApolloProvider was not passed a client instance. Make \" +\n 'sure you pass in your client via the \"client\" prop.'\n },\n\n 56: {\n file: \"@apollo/client/react/hoc/hoc-utils.js\",\n condition: \"this.withRef\",\n\n message: \"To access the wrapped instance, you need to specify \" +\n \"{ withRef: true } in the options\"\n },\n\n 57: {\n file: \"@apollo/client/react/hoc/withApollo.js\",\n condition: \"operationOptions.withRef\",\n\n message: \"To access the wrapped instance, you need to specify \" +\n \"{ withRef: true } in the options\"\n },\n\n 58: {\n file: \"@apollo/client/react/hooks/useApolloClient.js\",\n condition: \"!!client\",\n\n message: 'Could not find \"client\" in the context or passed in as an option. ' +\n \"Wrap the root component in an <ApolloProvider>, or pass an ApolloClient \" +\n \"instance in via options.\"\n },\n\n 59: {\n file: \"@apollo/client/react/hooks/useLoadableQuery.js\",\n condition: \"!calledDuringRender()\",\n message: \"useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook.\"\n },\n\n 60: {\n file: \"@apollo/client/react/hooks/useLoadableQuery.js\",\n condition: \"internalQueryRef\",\n message: \"The query has not been loaded. Please load the query.\"\n },\n\n 65: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n condition: \"!optionsRef.current.skip\",\n message: \"A subscription that is skipped cannot be restarted.\"\n },\n\n 66: {\n file: \"@apollo/client/react/hooks/useSuspenseQuery.js\",\n condition: \"supportedFetchPolicies.includes(fetchPolicy)\",\n message: \"The fetch policy `%s` is not supported with suspense.\"\n },\n\n 69: {\n file: \"@apollo/client/react/internal/cache/QueryReference.js\",\n condition: \"!queryRef || QUERY_REFERENCE_SYMBOL in queryRef\",\n message: \"Expected a QueryRef object, but got something else instead.\"\n },\n\n 70: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"!!document && !!document.kind\",\n\n message: \"Argument of %s passed to parser was not a valid GraphQL \" +\n \"DocumentNode. You may need to use 'graphql-tag' or another method \" +\n \"to convert your operation into a document\"\n },\n\n 71: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"!fragments.length ||\\n queries.length ||\\n mutations.length ||\\n subscriptions.length\",\n\n message: \"Passing only a fragment to 'graphql' is not yet supported. \" +\n \"You must include a query, subscription or mutation as well\"\n },\n\n 72: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"queries.length + mutations.length + subscriptions.length <= 1\",\n\n message: \"react-apollo only supports a query, subscription, or a mutation per HOC. \" +\n \"%s had %s queries, %s \" +\n \"subscriptions and %s mutations. \" +\n \"You can use 'compose' to join multiple operation types to a component\"\n },\n\n 73: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"definitions.length === 1\",\n\n message: \"react-apollo only supports one definition per HOC. %s had \" +\n \"%s definitions. \" +\n \"You can use 'compose' to join multiple operation types to a component\"\n },\n\n 74: {\n file: \"@apollo/client/react/parser/index.js\",\n condition: \"operation.type === type\",\n message: \"Running a %s requires a graphql \" + \"%s, but a %s was used instead.\"\n },\n\n 75: {\n file: \"@apollo/client/testing/core/mocking/mockLink.js\",\n condition: \"queryWithoutClientOnlyDirectives\",\n message: \"query is required\"\n },\n\n 76: {\n file: \"@apollo/client/testing/core/mocking/mockLink.js\",\n condition: \"mockedResponse.maxUsageCount > 0\",\n message: \"Mock response maxUsageCount must be greater than 0, %s given\"\n },\n\n 77: {\n file: \"@apollo/client/utilities/graphql/DocumentTransform.js\",\n condition: \"Array.isArray(cacheKeys)\",\n message: \"`getCacheKey` must return an array or undefined\"\n },\n\n 78: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"evaledValue !== void 0\",\n message: \"Invalid variable referenced in @%s directive.\"\n },\n\n 79: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"directiveArguments && directiveArguments.length === 1\",\n message: \"Incorrect number of arguments for the @%s directive.\"\n },\n\n 80: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"ifArgument.name && ifArgument.name.value === \\\"if\\\"\",\n message: \"Invalid argument for the @%s directive.\"\n },\n\n 81: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n condition: \"ifValue &&\\n (ifValue.kind === \\\"Variable\\\" || ifValue.kind === \\\"BooleanValue\\\")\",\n message: \"Argument for the @%s directive must be a variable or a boolean value.\"\n },\n\n 85: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n\n message: \"Found a %s operation%s. \" +\n \"No operations are allowed when using a fragment as a query. Only fragments are allowed.\"\n },\n\n 86: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n condition: \"fragments.length === 1\",\n message: \"Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment.\"\n },\n\n 87: {\n file: \"@apollo/client/utilities/graphql/fragments.js\",\n condition: \"fragment\",\n message: \"No fragment named %s\"\n },\n\n 88: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc && doc.kind === \\\"Document\\\"\",\n message: \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\"\n },\n\n 89: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n message: \"Schema type definitions not allowed in queries. Found: \\\"%s\\\"\"\n },\n\n 90: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"operations.length <= 1\",\n message: \"Ambiguous GraphQL document: contains %s operations\"\n },\n\n 91: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"queryDef && queryDef.operation === \\\"query\\\"\",\n message: \"Must contain a query definition.\"\n },\n\n 92: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc.kind === \\\"Document\\\"\",\n message: \"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\"\n },\n\n 93: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"doc.definitions.length <= 1\",\n message: \"Fragment must have exactly one definition.\"\n },\n\n 94: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n condition: \"fragmentDef.kind === \\\"FragmentDefinition\\\"\",\n message: \"Must be a fragment definition.\"\n },\n\n 95: {\n file: \"@apollo/client/utilities/graphql/getFromAST.js\",\n message: \"Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.\"\n },\n\n 96: {\n file: \"@apollo/client/utilities/graphql/storeUtils.js\",\n\n message: \"The inline argument \\\"%s\\\" of kind \\\"%s\\\"\" +\n \"is not supported. Use variables instead of inline arguments to \" +\n \"overcome this limitation.\"\n }\n};\n\nexport const devDebug = {\n 18: {\n file: \"@apollo/client/core/ApolloClient.js\",\n message: \"In client.refetchQueries, Promise.all promise rejected with error %o\"\n },\n\n 26: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Missing cache result fields: %o\"\n }\n};\n\nexport const devLog = {};\n\nexport const devWarn = {\n 1: {\n file: \"@apollo/client/cache/core/cache.js\",\n message: \"Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object.\"\n },\n\n 3: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n\n message: \"cache.modify: You are trying to write a Reference that is not part of the store: %o\\n\" +\n \"Please make sure to set the `mergeIntoStore` parameter to `true` when creating a Reference that is not part of the store yet:\\n\" +\n \"`toReference(object, true)`\"\n },\n\n 4: {\n file: \"@apollo/client/cache/inmemory/entityStore.js\",\n\n message: \"cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\\n\" +\n \"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`.\"\n },\n\n 7: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Inferring subtype %s of supertype %s\"\n },\n\n 8: {\n file: \"@apollo/client/cache/inmemory/policies.js\",\n message: \"Undefined 'from' passed to readField with arguments %s\"\n },\n\n 15: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Cache data may be lost when replacing the %s field of a %s object.\\n\\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\\n\\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\\n\\n existing: %o\\n incoming: %o\\n\\nFor more information about these options, please refer to the documentation:\\n\\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\\n\"\n },\n\n 21: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Called refetch(%o) for query %o, which does not declare a $variables variable.\\nDid you mean to call refetch(variables) instead of refetch({ variables })?\"\n },\n\n 35: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Unknown query named \\\"%s\\\" requested in refetchQueries options.include array\"\n },\n\n 36: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: \"Unknown anonymous query requested in refetchQueries options.include array\"\n },\n\n 37: {\n file: \"@apollo/client/core/QueryManager.js\",\n message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy \"no-cache\". Please add `@unmask` to each fragment spread to access the data.'\n },\n\n 38: {\n file: \"@apollo/client/link/core/ApolloLink.js\",\n message: \"You are calling concat on a terminating link, which will have no effect %o\"\n },\n\n 41: {\n file: \"@apollo/client/link/http/createHttpLink.js\",\n message: \"Multipart-subscriptions do not support @defer\"\n },\n\n 45: {\n file: \"@apollo/client/link/utils/toPromise.js\",\n message: \"Promise Wrapper does not support multiple results from Observable\"\n },\n\n 48: {\n file: \"@apollo/client/masking/maskDefinition.js\",\n message: \"Accessing unmasked field on %s at path '%s'. This field will not be available when masking is enabled. Please read the field from the fragment instead.\"\n },\n\n 52: {\n file: \"@apollo/client/masking/utils.js\",\n message: \"The configured cache does not support data masking which effectively disables it. Please use a cache that supports data masking or disable data masking to silence this warning.\"\n },\n\n 61: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.\"\n },\n\n 62: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead.\"\n },\n\n 63: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.\"\n },\n\n 64: {\n file: \"@apollo/client/react/hooks/useSubscription.js\",\n message: \"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead.\"\n },\n\n 67: {\n file: \"@apollo/client/react/hooks/useSuspenseQuery.js\",\n 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.\"\n },\n\n 82: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument does not support variables.\"\n },\n\n 83: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument must be of type string.\"\n },\n\n 84: {\n file: \"@apollo/client/utilities/graphql/directives.js\",\n message: \"@unmask 'mode' argument does not recognize value '%s'.\"\n },\n\n 98: {\n file: \"@apollo/client/utilities/graphql/transform.js\",\n\n message: \"Removing an @connection directive even though it does not have a key. \" +\n \"You may want to use the key parameter to specify a store key.\"\n }\n};\n\nexport const devError = {\n 13: {\n file: \"@apollo/client/cache/inmemory/writeToStore.js\",\n message: \"Missing field '%s' while writing result %o\"\n },\n\n 23: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Unhandled GraphQL subscription error\"\n },\n\n 25: {\n file: \"@apollo/client/core/ObservableQuery.js\",\n message: \"Unhandled error\"\n },\n\n 68: {\n file: \"@apollo/client/react/hooks/useSyncExternalStore.js\",\n message: \"The result of getSnapshot should be cached to avoid an infinite loop\"\n },\n\n 97: {\n file: \"@apollo/client/utilities/graphql/transform.js\",\n message: \"Could not find operation or fragment\"\n }\n};\n","export var version = \"3.12.5\";\n//# sourceMappingURL=version.js.map","export function maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n//# sourceMappingURL=maybe.js.map","import { maybe } from \"./maybe.js\";\nexport default (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || // We don't expect the Function constructor ever to be invoked at runtime, as\n// long as at least one of globalThis, window, self, or global is defined, so\n// we are under no obligation to make it easy for static analysis tools to\n// detect syntactic usage of the Function constructor. If you think you can\n// improve your static analysis to detect this obfuscation, think again. This\n// is an arms race you cannot win, at least not in JavaScript.\nmaybe(function () {\n return maybe.constructor(\"return this\")();\n}));\n//# sourceMappingURL=global.js.map","var prefixCounts = new Map();\n// These IDs won't be globally unique, but they will be unique within this\n// process, thanks to the counter, and unguessable thanks to the random suffix.\nexport function makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return \"\".concat(prefix, \":\").concat(count, \":\").concat(Math.random().toString(36).slice(2));\n}\n//# sourceMappingURL=makeUniqueId.js.map","import { makeUniqueId } from \"./makeUniqueId.js\";\nexport function stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space)\n .split(JSON.stringify(undefId))\n .join(\"<undefined>\");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map","import { invariant as originalInvariant, InvariantError } from \"ts-invariant\";\nimport { version } from \"../../version.js\";\nimport global from \"./global.js\";\nimport { stringifyForDisplay } from \"../common/stringifyForDisplay.js\";\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof message === \"number\") {\n var arg0 = message;\n message = getHandledErrorMsg(arg0);\n if (!message) {\n message = getFallbackErrorMsg(arg0, args);\n args = [];\n }\n }\n fn.apply(void 0, [message].concat(args));\n };\n}\nvar invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n originalInvariant(condition, getHandledErrorMsg(message, args) || getFallbackErrorMsg(message, args));\n }\n}, {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n});\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getHandledErrorMsg(message, optionalParams) ||\n getFallbackErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for(\"ApolloErrorMessageHandler_\" + version);\nfunction stringify(arg) {\n if (typeof arg == \"string\") {\n return arg;\n }\n try {\n return stringifyForDisplay(arg, 2).slice(0, 1000);\n }\n catch (_a) {\n return \"<non-serializable>\";\n }\n}\nfunction getHandledErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return (global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, messageArgs.map(stringify)));\n}\nfunction getFallbackErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n return \"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#\".concat(encodeURIComponent(JSON.stringify({\n version: version,\n message: message,\n args: messageArgs.map(stringify),\n })));\n}\nexport { invariant, InvariantError, newInvariantError, ApolloErrorMessageHandler, };\n//# sourceMappingURL=invariantWrappers.js.map","import { global } from \"../utilities/globals/index.js\";\nimport { ApolloErrorMessageHandler } from \"../utilities/globals/invariantWrappers.js\";\n/**\n * Overrides the global \"Error Message Handler\" with a custom implementation.\n */\nexport function setErrorMessageHandler(handler) {\n global[ApolloErrorMessageHandler] = handler;\n}\n//# sourceMappingURL=setErrorMessageHandler.js.map","import { global } from \"../utilities/globals/index.js\";\nimport { ApolloErrorMessageHandler } from \"../utilities/globals/invariantWrappers.js\";\nimport { setErrorMessageHandler } from \"./setErrorMessageHandler.js\";\n/**\n * Injects Apollo Client's default error message handler into the application and\n * also loads the error codes that are passed in as arguments.\n */\nexport function loadErrorMessageHandler() {\n var errorCodes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n errorCodes[_i] = arguments[_i];\n }\n setErrorMessageHandler(handler);\n for (var _a = 0, errorCodes_1 = errorCodes; _a < errorCodes_1.length; _a++) {\n var codes = errorCodes_1[_a];\n Object.assign(handler, codes);\n }\n return handler;\n}\nvar handler = (function (message, args) {\n if (typeof message === \"number\") {\n var definition = global[ApolloErrorMessageHandler][message];\n if (!message || !(definition === null || definition === void 0 ? void 0 : definition.message))\n return;\n message = definition.message;\n }\n return args.reduce(function (msg, arg) { return msg.replace(/%[sdfo]/, String(arg)); }, String(message));\n});\n//# sourceMappingURL=loadErrorMessageHandler.js.map","import { devDebug, devError, devLog, devWarn } from \"../invariantErrorCodes.js\";\nimport { loadErrorMessageHandler } from \"./loadErrorMessageHandler.js\";\nexport function loadDevMessages() {\n loadErrorMessageHandler(devDebug, devError, devLog, devWarn);\n}\n//# sourceMappingURL=loadDevMessages.js.map","import { errorCodes } from \"../invariantErrorCodes.js\";\nimport { loadErrorMessageHandler } from \"./loadErrorMessageHandler.js\";\nexport function loadErrorMessages() {\n loadErrorMessageHandler(errorCodes);\n}\n//# sourceMappingURL=loadErrorMessages.js.map"],"names":["originalInvariant","global"],"mappings":";;;;;;;AAAO,MAAM,UAAU;AAGvB;AACA,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,8CAA8C;AACxD,IAAI,SAAS,EAAE,8BAA8B;AAC7C,IAAI,OAAO,EAAE,iCAAiC;AAC9C,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,SAAS,EAAE,sBAAsB;AACrC,IAAI,OAAO,EAAE,uDAAuD;AACpE,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,SAAS,EAAE,uBAAuB;AACtC,IAAI,OAAO,EAAE,iDAAiD;AAC9D,GAAG;AAEH,EAAE,CAAC,EAAE;AACL,IAAI,IAAI,EAAE,2CAA2C;AACrD,IAAI,OAAO,EAAE,mCAAmC;AAChD,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,OAAO,EAAE,sBAAsB;AACnC,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,gDAAgD;AAC1D,IAAI,SAAS,EAAE,qBAAqB;AACpC,IAAI,OAAO,EAAE,yEAAyE;AACtF,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,+CAA+C;AACzD,IAAI,OAAO,EAAE,8BAA8B;AAC3C,GAAG;AAEH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,+CAA+C;AACzD,IAAI,OAAO,EAAE,sBAAsB;AACnC,GAAG;AAEH,EAAE,EAAE,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AE,MAAM,EAAE,OAAO,CAAC,CAAC;AACjE;;ACFO,SAAS,iBAAiB,GAAG;AACpC,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;AACxC;;;;;;;"}
@@ -405,7 +405,7 @@ const devWarn = {
405
405
  },
406
406
  36: {
407
407
  file: "@apollo/client/core/QueryManager.js",
408
- message: "Unknown query %o requested in refetchQueries options.include array"
408
+ message: "Unknown anonymous query requested in refetchQueries options.include array"
409
409
  },
410
410
  37: {
411
411
  file: "@apollo/client/core/QueryManager.js",
@@ -492,7 +492,7 @@ const devError = {
492
492
  }
493
493
  };
494
494
 
495
- var version = "3.12.3";
495
+ var version = "3.12.5";
496
496
 
497
497
  function maybe(thunk) {
498
498
  try {
@@ -497,7 +497,7 @@ export const devWarn = {
497
497
 
498
498
  36: {
499
499
  file: "@apollo/client/core/QueryManager.js",
500
- message: "Unknown query %o requested in refetchQueries options.include array"
500
+ message: "Unknown anonymous query requested in refetchQueries options.include array"
501
501
  },
502
502
 
503
503
  37: {
@@ -170,7 +170,9 @@ test("detects `$fragmentRefs` on types with index signatures", function (prefix)
170
170
  }).types([6, "instantiations"]);
171
171
  bench(prefix + "functionality", function () {
172
172
  var x = {};
173
+ var y = {};
173
174
  expectTypeOf(x).branded.toEqualTypeOf();
175
+ expectTypeOf(y).toEqualTypeOf();
174
176
  });
175
177
  });
176
178
  test("recursive types: no error 'Type instantiation is excessively deep and possibly infinite.'", function (prefix) {
@@ -182,4 +184,30 @@ test("recursive types: no error 'Type instantiation is excessively deep and poss
182
184
  expectTypeOf(x).branded.toEqualTypeOf();
183
185
  });
184
186
  });
187
+ test("MaybeMasked can be called with a generic if `mode` is not set to `unmask`", function (prefix) {
188
+ function withGenericResult(arg) {
189
+ bench(prefix + "Result generic - instantiations", function () {
190
+ var maybeMasked = arg;
191
+ return maybeMasked;
192
+ }).types();
193
+ bench(prefix + "Result generic - functionality", function () {
194
+ var maybeMasked = arg;
195
+ expectTypeOf(maybeMasked).toEqualTypeOf(arg);
196
+ });
197
+ }
198
+ function withGenericDocument(arg) {
199
+ bench(prefix + "Result generic - instantiations", function () {
200
+ var maybeMasked = arg;
201
+ return maybeMasked;
202
+ }).types();
203
+ bench(prefix + "Result generic - functionality", function () {
204
+ var maybeMasked = arg;
205
+ // cannot use unresolved generic with `expectTypeOf` here so we just try an assignment the other way round
206
+ var test = maybeMasked;
207
+ return test;
208
+ });
209
+ }
210
+ withGenericResult({});
211
+ withGenericDocument({});
212
+ });
185
213
  //# sourceMappingURL=types.bench.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.bench.js","sourceRoot":"","sources":["../../../src/masking/__benches__/types.bench.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,KAAK,CAAC;IACJ,eAAe,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;CACjC,CAAC,CAAC;AAEH,SAAS,IAAI,CAAC,IAAY,EAAE,EAA0B;IACpD,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;AAClB,CAAC;AAcD,IAAI,CAAC,iCAAiC,EAAE,UAAC,MAAM;IAgC7C,KAAK,CAAC,MAAM,GAAG,gBAAgB,EAAE;QAC/B,OAAO,EAAsB,CAAC;IAChC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,MAAM,GAAG,eAAe,EAAE;QAC9B,YAAY,EAAoB,CAAC,aAAa,EAQ1C,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,iCAAiC,EAAE,UAAC,MAAM;IAsC7C,KAAK,CAAC,MAAM,GAAG,gBAAgB,EAAE;QAC/B,OAAO,EAAsB,CAAC;IAChC,CA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AAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAU,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,wDAAwD,EAAE,UAAC,MAAM;IAsBpE,KAAK,CAAC,MAAM,GAAG,gBAAgB,EAAE;QAC/B,OAAO,EAAyB,CAAC;IACnC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,MAAM,GAAG,eAAe,EAAE;QAC9B,IAAM,CAAC,GAAG,EAAyB,CAAC;QAEpC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAMjC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,2FAA2F,EAAE,UAAC,MAAM;IAIvG,KAAK,CAAC,MAAM,GAAG,gBAAgB,EAAE;QAC/B,OAAO,EAAyB,CAAC;IACnC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEhC,KAAK,CAAC,MAAM,GAAG,eAAe,EAAE;QAC9B,IAAM,CAAC,GAAG,EAAyB,CAAC;QAEpC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAU,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import type { MaybeMasked, Unmasked } from \"../index.js\";\nimport { attest, bench } from \"@ark/attest\";\nimport { expectTypeOf } from \"expect-type\";\nimport type { DeepPartial } from \"../../utilities/index.js\";\n\nimport { setup } from \"@ark/attest\";\n\nsetup({\n updateSnapshots: !process.env.CI,\n});\n\nfunction test(name: string, fn: (name: string) => void) {\n fn(name + \": \");\n}\n\ntype UnrelatedType = {\n __typename: \"Unrelated\";\n} & { \" $fragmentName\"?: \"Unrelated\" } & {\n \" $fragmentRefs\"?: {\n Unrelated: {\n __unrelated: boolean;\n };\n };\n};\n// @ts-ignore\ntype _TypeCacheWarmup = Unmasked<UnrelatedType> | MaybeMasked<UnrelatedType>;\n\ntest(\"unmasks deeply nested fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n JobFieldsFragment: JobFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"User\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"User\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n job: string;\n position: string;\n }>();\n });\n});\n\ntest(\"unmasks deeply nested fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n jobs: Array<\n {\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } }\n >;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"Job\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"Job\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n jobs: Array<{\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n }>;\n }>();\n });\n});\n\ntest(\"unmasks deeply nested nullable fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n career:\n | ({\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } })\n | null;\n jobs: Array<\n | ({\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } })\n | null\n >;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"Job\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"Job\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n career: {\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n } | null;\n jobs: Array<{\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n } | null>;\n }>();\n });\n});\n\ntest(\"unmasks DeepPartial types\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type Source = DeepPartial<UserFieldsFragment>;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename?: \"User\";\n id?: number;\n age?: number;\n firstName?: string;\n lastName?: string;\n }>();\n });\n});\n\ntest(\"Unmasked handles odd types\", (prefix) => {\n bench(prefix + \"empty type instantiations\", () => {\n attest<{}, Unmasked<{}>>();\n }).types([80, \"instantiations\"]);\n\n bench(prefix + \"empty type functionality\", () => {\n expectTypeOf<Unmasked<{}>>().toEqualTypeOf<{}>();\n });\n\n bench(prefix + \"generic record type instantiations\", () => {\n attest<Record<string, any>, Unmasked<Record<string, any>>>();\n }).types([99, \"instantiations\"]);\n\n bench(prefix + \"generic record type functionality\", () => {\n expectTypeOf<Unmasked<Record<string, any>>>().toEqualTypeOf<\n Record<string, any>\n >();\n });\n\n bench(prefix + \"unknown instantiations\", () => {\n attest<unknown, Unmasked<unknown>>();\n }).types([47, \"instantiations\"]);\n\n bench(prefix + \"unknown functionality\", () => {\n expectTypeOf<Unmasked<unknown>>().toBeUnknown();\n });\n\n bench(prefix + \"any instantiations\", () => {\n attest<any, Unmasked<any>>();\n }).types([48, \"instantiations\"]);\n\n bench(prefix + \"any functionality\", () => {\n expectTypeOf<Unmasked<any>>().toBeAny();\n });\n});\n\ntest(\"MaybeMasked handles odd types\", (prefix) => {\n bench(prefix + \"empty type instantiations\", () => {\n attest<{}, MaybeMasked<{}>>();\n }).types([76, \"instantiations\"]);\n\n bench(prefix + \"empty type functionality\", () => {\n expectTypeOf<MaybeMasked<{}>>().toEqualTypeOf<{}>();\n });\n\n bench(prefix + \"generic record type instantiations\", () => {\n attest<Record<string, any>, MaybeMasked<Record<string, any>>>();\n }).types([93, \"instantiations\"]);\n bench(prefix + \"generic record type functionality\", () => {\n expectTypeOf<MaybeMasked<Record<string, any>>>().toEqualTypeOf<\n Record<string, any>\n >();\n });\n\n bench(prefix + \"unknown instantiations\", () => {\n attest<unknown, MaybeMasked<unknown>>();\n }).types([54, \"instantiations\"]);\n bench(prefix + \"unknown functionality\", () => {\n expectTypeOf<MaybeMasked<unknown>>().toBeUnknown();\n });\n\n bench(prefix + \"any instantiations\", () => {\n attest<any, MaybeMasked<any>>();\n }).types([49, \"instantiations\"]);\n bench(prefix + \"any functionality\", () => {\n expectTypeOf<MaybeMasked<any>>().toBeAny();\n });\n});\n\ntest(\"distributed members on MaybeMasked\", (prefix) => {\n (function unresolvedGeneric<T>() {\n bench(prefix + \"one unresolved generic mixed with null|undefined\", () => {\n attest<\n [MaybeMasked<T> | null | undefined],\n [MaybeMasked<T | null | undefined>]\n >();\n }).types([55, \"instantiations\"]);\n })();\n\n (function unresolvedGenerics<T, V>() {\n bench(prefix + \"two unresolved generics distribute\", () => {\n attest<[MaybeMasked<T> | MaybeMasked<V>], [MaybeMasked<T | V>]>();\n }).types([61, \"instantiations\"]);\n })();\n});\n\ntest(\"deals with overlapping array from parent fragment\", (prefix) => {\n type Source = {\n __typename: \"Track\";\n /** comment: id */\n id: number;\n /** comment: artists */\n artists?: Array<{\n __typename: \"Artist\";\n /** comment: artists.id */\n id: number;\n \" $fragmentRefs\"?: {\n ArtistFragment: ArtistFragment;\n };\n }> | null;\n \" $fragmentRefs\"?: {\n NestedTrackFragment: NestedTrackFragment;\n };\n };\n\n type ArtistFragment = {\n \" $fragmentName\"?: \"Fragment__Artist\";\n __typename: \"Artist\";\n /** comment: artists.birthday */\n birthdate: string;\n };\n\n type NestedTrackFragment = {\n \" $fragmentName\"?: \"Fragment__Track\";\n __typename: \"Track\";\n artists?: Array<{\n __typename: \"Artist\";\n /** comment: artists.lastname */\n lastname: string;\n }> | null;\n };\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n // some fields for hovering\n x.id;\n x.artists;\n x.artists?.[0]?.id;\n x.artists?.[0]?.birthdate;\n x.artists?.[0]?.lastname;\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Track\";\n id: number;\n artists?:\n | Array<{\n __typename: \"Artist\";\n id: number;\n birthdate: string;\n lastname: string;\n }>\n | null\n | undefined;\n }>();\n });\n});\n\ntest(\"base type, multiple fragments on sub-types\", (prefix) => {\n type Source = {\n __typename: \"Track\";\n id: number;\n artists?: Array<{\n __typename: \"Person\" | \"Animatronic\" | \"CartoonCharacter\";\n id: number;\n name: string;\n \" $fragmentRefs\"?: {\n PersonFragment: PersonFragment;\n AnimatronicFragment: AnimatronicFragment;\n CartoonCharacterFragment: CartoonCharacterFragment;\n };\n }> | null;\n };\n\n type PersonFragment = {\n \" $fragmentName\"?: \"Fragment__Person\";\n __typename: \"Person\";\n birthdate: string;\n };\n type AnimatronicFragment = {\n \" $fragmentName\"?: \"Fragment__Animatronic\";\n __typename: \"Animatronic\";\n manufacturer: string;\n warrantyEndDate: string;\n };\n type CartoonCharacterFragment = {\n \" $fragmentName\"?: \"Fragment__CartoonCharacter\";\n __typename: \"CartoonCharacter\";\n animator: string;\n voiceActor: string;\n };\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Track\";\n id: number;\n artists?:\n | Array<\n | {\n __typename: \"Person\";\n id: number;\n name: string;\n birthdate: string;\n }\n | {\n __typename: \"Animatronic\";\n id: number;\n name: string;\n manufacturer: string;\n warrantyEndDate: string;\n }\n | {\n __typename: \"CartoonCharacter\";\n id: number;\n name: string;\n animator: string;\n voiceActor: string;\n }\n >\n | null\n | undefined;\n }>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` if type contains `any`\", (prefix) => {\n interface Source {\n foo: { bar: any[] };\n \" $fragmentName\": \"foo\";\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"leaves tuples alone\", (prefix) => {\n interface Source {\n coords: [long: number, lat: number];\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<{\n coords: [long: number, lat: number];\n }>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` if type is a record type\", (prefix) => {\n interface MetadataItem {\n foo: string;\n }\n\n interface Source {\n metadata: Record<string, MetadataItem>;\n \" $fragmentName\": \"Source\";\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` on types with index signatures\", (prefix) => {\n interface Source {\n foo: string;\n \" $fragmentName\": \"Source\";\n [key: string]: string;\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"detects `$fragmentRefs` on types with index signatures\", (prefix) => {\n type Source = {\n __typename: \"Foo\";\n id: number;\n metadata: Record<string, number>;\n structuredMetadata: StructuredMetadata;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n FooFragment: FooFragment;\n };\n };\n\n interface StructuredMetadata {\n bar: number;\n [index: string]: number;\n }\n\n type FooFragment = {\n __typename: \"Foo\";\n foo: string;\n } & { \" $fragmentName\"?: \"FooFragment\" };\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Foo\";\n id: number;\n metadata: Record<string, number>;\n foo: string;\n structuredMetadata: StructuredMetadata;\n }>();\n });\n});\n\ntest(\"recursive types: no error 'Type instantiation is excessively deep and possibly infinite.'\", (prefix) => {\n // this type is self-recursive\n type Source = import(\"graphql\").IntrospectionQuery;\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n"]}
1
+ {"version":3,"file":"types.bench.js","sourceRoot":"","sources":["../../../src/masking/__benches__/types.bench.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,KAAK,E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B,CAAC,EAAS,CAAC,CAAC;IAC7B,mBAAmB,CAAC,EAAS,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC","sourcesContent":["import type { MaybeMasked, Unmasked } from \"../index.js\";\nimport { attest, bench } from \"@ark/attest\";\nimport { expectTypeOf } from \"expect-type\";\nimport type { DeepPartial } from \"../../utilities/index.js\";\n\nimport { setup } from \"@ark/attest\";\nimport type { ContainsFragmentsRefs } from \"../internal/types.js\";\nimport type { TypedDocumentNode } from \"../../index.js\";\n\nsetup({\n updateSnapshots: !process.env.CI,\n});\n\nfunction test(name: string, fn: (name: string) => void) {\n fn(name + \": \");\n}\n\ntype UnrelatedType = {\n __typename: \"Unrelated\";\n} & { \" $fragmentName\"?: \"Unrelated\" } & {\n \" $fragmentRefs\"?: {\n Unrelated: {\n __unrelated: boolean;\n };\n };\n};\n// @ts-ignore\ntype _TypeCacheWarmup = Unmasked<UnrelatedType> | MaybeMasked<UnrelatedType>;\n\ntest(\"unmasks deeply nested fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n JobFieldsFragment: JobFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"User\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"User\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n job: string;\n position: string;\n }>();\n });\n});\n\ntest(\"unmasks deeply nested fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n jobs: Array<\n {\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } }\n >;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"Job\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"Job\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n jobs: Array<{\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n }>;\n }>();\n });\n});\n\ntest(\"unmasks deeply nested nullable fragments\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n career:\n | ({\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } })\n | null;\n jobs: Array<\n | ({\n __typename: \"Job\";\n id: string;\n title: string;\n } & { \" $fragmentRefs\"?: { JobFieldsFragment: JobFieldsFragment } })\n | null\n >;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type JobFieldsFragment = {\n __typename: \"Job\";\n job: string;\n } & { \" $fragmentName\"?: \"JobFieldsFragment\" } & {\n \" $fragmentRefs\"?: { CareerFieldsFragment: CareerFieldsFragment };\n };\n\n type CareerFieldsFragment = {\n __typename: \"Job\";\n position: string;\n } & { \" $fragmentName\"?: \"CareerFieldsFragment\" };\n\n type Source = UserFieldsFragment;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename: \"User\";\n id: number;\n age: number;\n firstName: string;\n lastName: string;\n career: {\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n } | null;\n jobs: Array<{\n __typename: \"Job\";\n id: string;\n title: string;\n job: string;\n position: string;\n } | null>;\n }>();\n });\n});\n\ntest(\"unmasks DeepPartial types\", (prefix) => {\n type UserFieldsFragment = {\n __typename: \"User\";\n id: number;\n age: number;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n NameFieldsFragment: NameFieldsFragment;\n };\n };\n\n type NameFieldsFragment = {\n __typename: \"User\";\n firstName: string;\n lastName: string;\n } & { \" $fragmentName\"?: \"NameFieldsFragment\" };\n\n type Source = DeepPartial<UserFieldsFragment>;\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n expectTypeOf<Unmasked<Source>>().toEqualTypeOf<{\n __typename?: \"User\";\n id?: number;\n age?: number;\n firstName?: string;\n lastName?: string;\n }>();\n });\n});\n\ntest(\"Unmasked handles odd types\", (prefix) => {\n bench(prefix + \"empty type instantiations\", () => {\n attest<{}, Unmasked<{}>>();\n }).types([80, \"instantiations\"]);\n\n bench(prefix + \"empty type functionality\", () => {\n expectTypeOf<Unmasked<{}>>().toEqualTypeOf<{}>();\n });\n\n bench(prefix + \"generic record type instantiations\", () => {\n attest<Record<string, any>, Unmasked<Record<string, any>>>();\n }).types([99, \"instantiations\"]);\n\n bench(prefix + \"generic record type functionality\", () => {\n expectTypeOf<Unmasked<Record<string, any>>>().toEqualTypeOf<\n Record<string, any>\n >();\n });\n\n bench(prefix + \"unknown instantiations\", () => {\n attest<unknown, Unmasked<unknown>>();\n }).types([47, \"instantiations\"]);\n\n bench(prefix + \"unknown functionality\", () => {\n expectTypeOf<Unmasked<unknown>>().toBeUnknown();\n });\n\n bench(prefix + \"any instantiations\", () => {\n attest<any, Unmasked<any>>();\n }).types([48, \"instantiations\"]);\n\n bench(prefix + \"any functionality\", () => {\n expectTypeOf<Unmasked<any>>().toBeAny();\n });\n});\n\ntest(\"MaybeMasked handles odd types\", (prefix) => {\n bench(prefix + \"empty type instantiations\", () => {\n attest<{}, MaybeMasked<{}>>();\n }).types([76, \"instantiations\"]);\n\n bench(prefix + \"empty type functionality\", () => {\n expectTypeOf<MaybeMasked<{}>>().toEqualTypeOf<{}>();\n });\n\n bench(prefix + \"generic record type instantiations\", () => {\n attest<Record<string, any>, MaybeMasked<Record<string, any>>>();\n }).types([93, \"instantiations\"]);\n bench(prefix + \"generic record type functionality\", () => {\n expectTypeOf<MaybeMasked<Record<string, any>>>().toEqualTypeOf<\n Record<string, any>\n >();\n });\n\n bench(prefix + \"unknown instantiations\", () => {\n attest<unknown, MaybeMasked<unknown>>();\n }).types([54, \"instantiations\"]);\n bench(prefix + \"unknown functionality\", () => {\n expectTypeOf<MaybeMasked<unknown>>().toBeUnknown();\n });\n\n bench(prefix + \"any instantiations\", () => {\n attest<any, MaybeMasked<any>>();\n }).types([49, \"instantiations\"]);\n bench(prefix + \"any functionality\", () => {\n expectTypeOf<MaybeMasked<any>>().toBeAny();\n });\n});\n\ntest(\"distributed members on MaybeMasked\", (prefix) => {\n (function unresolvedGeneric<T>() {\n bench(prefix + \"one unresolved generic mixed with null|undefined\", () => {\n attest<\n [MaybeMasked<T> | null | undefined],\n [MaybeMasked<T | null | undefined>]\n >();\n }).types([55, \"instantiations\"]);\n })();\n\n (function unresolvedGenerics<T, V>() {\n bench(prefix + \"two unresolved generics distribute\", () => {\n attest<[MaybeMasked<T> | MaybeMasked<V>], [MaybeMasked<T | V>]>();\n }).types([61, \"instantiations\"]);\n })();\n});\n\ntest(\"deals with overlapping array from parent fragment\", (prefix) => {\n type Source = {\n __typename: \"Track\";\n /** comment: id */\n id: number;\n /** comment: artists */\n artists?: Array<{\n __typename: \"Artist\";\n /** comment: artists.id */\n id: number;\n \" $fragmentRefs\"?: {\n ArtistFragment: ArtistFragment;\n };\n }> | null;\n \" $fragmentRefs\"?: {\n NestedTrackFragment: NestedTrackFragment;\n };\n };\n\n type ArtistFragment = {\n \" $fragmentName\"?: \"Fragment__Artist\";\n __typename: \"Artist\";\n /** comment: artists.birthday */\n birthdate: string;\n };\n\n type NestedTrackFragment = {\n \" $fragmentName\"?: \"Fragment__Track\";\n __typename: \"Track\";\n artists?: Array<{\n __typename: \"Artist\";\n /** comment: artists.lastname */\n lastname: string;\n }> | null;\n };\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n // some fields for hovering\n x.id;\n x.artists;\n x.artists?.[0]?.id;\n x.artists?.[0]?.birthdate;\n x.artists?.[0]?.lastname;\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Track\";\n id: number;\n artists?:\n | Array<{\n __typename: \"Artist\";\n id: number;\n birthdate: string;\n lastname: string;\n }>\n | null\n | undefined;\n }>();\n });\n});\n\ntest(\"base type, multiple fragments on sub-types\", (prefix) => {\n type Source = {\n __typename: \"Track\";\n id: number;\n artists?: Array<{\n __typename: \"Person\" | \"Animatronic\" | \"CartoonCharacter\";\n id: number;\n name: string;\n \" $fragmentRefs\"?: {\n PersonFragment: PersonFragment;\n AnimatronicFragment: AnimatronicFragment;\n CartoonCharacterFragment: CartoonCharacterFragment;\n };\n }> | null;\n };\n\n type PersonFragment = {\n \" $fragmentName\"?: \"Fragment__Person\";\n __typename: \"Person\";\n birthdate: string;\n };\n type AnimatronicFragment = {\n \" $fragmentName\"?: \"Fragment__Animatronic\";\n __typename: \"Animatronic\";\n manufacturer: string;\n warrantyEndDate: string;\n };\n type CartoonCharacterFragment = {\n \" $fragmentName\"?: \"Fragment__CartoonCharacter\";\n __typename: \"CartoonCharacter\";\n animator: string;\n voiceActor: string;\n };\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Track\";\n id: number;\n artists?:\n | Array<\n | {\n __typename: \"Person\";\n id: number;\n name: string;\n birthdate: string;\n }\n | {\n __typename: \"Animatronic\";\n id: number;\n name: string;\n manufacturer: string;\n warrantyEndDate: string;\n }\n | {\n __typename: \"CartoonCharacter\";\n id: number;\n name: string;\n animator: string;\n voiceActor: string;\n }\n >\n | null\n | undefined;\n }>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` if type contains `any`\", (prefix) => {\n interface Source {\n foo: { bar: any[] };\n \" $fragmentName\": \"foo\";\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"leaves tuples alone\", (prefix) => {\n interface Source {\n coords: [long: number, lat: number];\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as Unmasked<Source>;\n }).types([5, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<{\n coords: [long: number, lat: number];\n }>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` if type is a record type\", (prefix) => {\n interface MetadataItem {\n foo: string;\n }\n\n interface Source {\n metadata: Record<string, MetadataItem>;\n \" $fragmentName\": \"Source\";\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"does not detect `$fragmentRefs` on types with index signatures\", (prefix) => {\n interface Source {\n foo: string;\n \" $fragmentName\": \"Source\";\n [key: string]: string;\n }\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"detects `$fragmentRefs` on types with index signatures\", (prefix) => {\n type Source = {\n __typename: \"Foo\";\n id: number;\n metadata: Record<string, number>;\n structuredMetadata: StructuredMetadata;\n } & { \" $fragmentName\"?: \"UserFieldsFragment\" } & {\n \" $fragmentRefs\"?: {\n FooFragment: FooFragment;\n };\n };\n\n interface StructuredMetadata {\n bar: number;\n [index: string]: number;\n }\n\n type FooFragment = {\n __typename: \"Foo\";\n foo: string;\n } & { \" $fragmentName\"?: \"FooFragment\" };\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as Unmasked<Source>;\n const y = {} as ContainsFragmentsRefs<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<{\n __typename: \"Foo\";\n id: number;\n metadata: Record<string, number>;\n foo: string;\n structuredMetadata: StructuredMetadata;\n }>();\n expectTypeOf(y).toEqualTypeOf<true>();\n });\n});\n\ntest(\"recursive types: no error 'Type instantiation is excessively deep and possibly infinite.'\", (prefix) => {\n // this type is self-recursive\n type Source = import(\"graphql\").IntrospectionQuery;\n\n bench(prefix + \"instantiations\", () => {\n return {} as MaybeMasked<Source>;\n }).types([6, \"instantiations\"]);\n\n bench(prefix + \"functionality\", () => {\n const x = {} as MaybeMasked<Source>;\n\n expectTypeOf(x).branded.toEqualTypeOf<Source>();\n });\n});\n\ntest(\"MaybeMasked can be called with a generic if `mode` is not set to `unmask`\", (prefix) => {\n function withGenericResult<T extends { [key: string]: string }>(\n arg: TypedDocumentNode<T, {}>\n ) {\n bench(prefix + \"Result generic - instantiations\", () => {\n const maybeMasked: MaybeMasked<typeof arg> = arg;\n return maybeMasked;\n }).types();\n\n bench(prefix + \"Result generic - functionality\", () => {\n const maybeMasked: MaybeMasked<typeof arg> = arg;\n expectTypeOf(maybeMasked).toEqualTypeOf(arg);\n });\n }\n function withGenericDocument<T extends TypedDocumentNode>(arg: T) {\n bench(prefix + \"Result generic - instantiations\", () => {\n const maybeMasked: MaybeMasked<T> = arg;\n return maybeMasked;\n }).types();\n\n bench(prefix + \"Result generic - functionality\", () => {\n const maybeMasked: MaybeMasked<T> = arg;\n // cannot use unresolved generic with `expectTypeOf` here so we just try an assignment the other way round\n const test: T = maybeMasked;\n return test;\n });\n }\n withGenericResult({} as any);\n withGenericDocument({} as any);\n});\n"]}
@@ -32,11 +32,13 @@ export type FragmentType<TData> = [
32
32
  * Returns TData as either masked or unmasked depending on whether masking is
33
33
  * enabled.
34
34
  */
35
- export type MaybeMasked<TData> = TData extends any ? true extends IsAny<TData> ? TData : TData extends {
35
+ export type MaybeMasked<TData> = DataMasking extends {
36
+ mode: "unmask";
37
+ } ? TData extends any ? true extends IsAny<TData> ? TData : TData extends {
36
38
  __masked?: true;
37
- } ? Prettify<RemoveMaskedMarker<TData>> : DataMasking extends {
38
- enabled: true;
39
- } ? TData : true extends ContainsFragmentsRefs<TData> ? Unmasked<TData> : TData : never;
39
+ } ? Prettify<RemoveMaskedMarker<TData>> : true extends ContainsFragmentsRefs<TData> ? Unmasked<TData> : TData : never : DataMasking extends {
40
+ mode: "preserveTypes";
41
+ } ? TData : TData;
40
42
  /**
41
43
  * Unmasks a type to provide its full result.
42
44
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/masking/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport type {\n ContainsFragmentsRefs,\n IsAny,\n RemoveFragmentName,\n RemoveMaskedMarker,\n UnwrapFragmentRefs,\n} from \"./internal/types.js\";\nimport type { Prettify } from \"../utilities/index.js\";\n\nexport interface DataMasking {}\n\n/**\n * Marks a type as masked. This is used by `MaybeMasked` when determining\n * whether to use the masked or unmasked type.\n */\nexport type Masked<TData> = TData & {\n __masked?: true;\n};\n\n/**\n * Marks a type as masked. This is a shortcut for\n * `TypedDocumentNode<Masked<TData>, TVariables>`\n */\nexport type MaskedDocumentNode<\n TData = { [key: string]: any },\n TVariables = { [key: string]: any },\n> = TypedDocumentNode<Masked<TData>, TVariables>;\n\nexport type FragmentType<TData> =\n [TData] extends [{ \" $fragmentName\"?: infer TKey }] ?\n TKey extends string ?\n { \" $fragmentRefs\"?: { [key in TKey]: TData } }\n : never\n : never;\n\n/**\n * Returns TData as either masked or unmasked depending on whether masking is\n * enabled.\n */\nexport type MaybeMasked<TData> =\n // distribute TData - in case of a union, do the next steps for each member\n TData extends any ?\n // prevent \"Type instantiation is excessively deep and possibly infinite.\"\n true extends IsAny<TData> ? TData\n : TData extends { __masked?: true } ? Prettify<RemoveMaskedMarker<TData>>\n : DataMasking extends { enabled: true } ? TData\n : true extends ContainsFragmentsRefs<TData> ? Unmasked<TData>\n : TData\n : never;\n\n/**\n * Unmasks a type to provide its full result.\n */\nexport type Unmasked<TData> =\n true extends IsAny<TData> ? TData\n : TData extends object ?\n UnwrapFragmentRefs<RemoveMaskedMarker<RemoveFragmentName<TData>>>\n : TData;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/masking/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport type {\n ContainsFragmentsRefs,\n IsAny,\n RemoveFragmentName,\n RemoveMaskedMarker,\n UnwrapFragmentRefs,\n} from \"./internal/types.js\";\nimport type { Prettify } from \"../utilities/index.js\";\n\nexport interface DataMasking {}\n\n/**\n * Marks a type as masked. This is used by `MaybeMasked` when determining\n * whether to use the masked or unmasked type.\n */\nexport type Masked<TData> = TData & {\n __masked?: true;\n};\n\n/**\n * Marks a type as masked. This is a shortcut for\n * `TypedDocumentNode<Masked<TData>, TVariables>`\n */\nexport type MaskedDocumentNode<\n TData = { [key: string]: any },\n TVariables = { [key: string]: any },\n> = TypedDocumentNode<Masked<TData>, TVariables>;\n\nexport type FragmentType<TData> =\n [TData] extends [{ \" $fragmentName\"?: infer TKey }] ?\n TKey extends string ?\n { \" $fragmentRefs\"?: { [key in TKey]: TData } }\n : never\n : never;\n\n/**\n * Returns TData as either masked or unmasked depending on whether masking is\n * enabled.\n */\nexport type MaybeMasked<TData> =\n DataMasking extends { mode: \"unmask\" } ?\n // distribute TData - in case of a union, do the next steps for each member\n TData extends any ?\n // prevent \"Type instantiation is excessively deep and possibly infinite.\"\n true extends IsAny<TData> ? TData\n : TData extends { __masked?: true } ? Prettify<RemoveMaskedMarker<TData>>\n : true extends ContainsFragmentsRefs<TData> ? Unmasked<TData>\n : TData\n : never\n : DataMasking extends { mode: \"preserveTypes\" } ? TData\n : TData;\n\n/**\n * Unmasks a type to provide its full result.\n */\nexport type Unmasked<TData> =\n true extends IsAny<TData> ? TData\n : TData extends object ?\n UnwrapFragmentRefs<RemoveMaskedMarker<RemoveFragmentName<TData>>>\n : TData;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo/client",
3
- "version": "3.12.3",
3
+ "version": "3.12.5",
4
4
  "description": "A fully-featured caching GraphQL client.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -56,7 +56,7 @@ export type UpdateInternalState<TData, TVariables extends OperationVariables> =
56
56
  */
57
57
  export declare function useQuery<TData = any, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: QueryHookOptions<NoInfer<TData>, NoInfer<TVariables>>): QueryResult<TData, TVariables>;
58
58
  export declare function useQueryInternals<TData = any, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: QueryHookOptions<NoInfer<TData>, NoInfer<TVariables>>): {
59
- result: InternalQueryResult<TData, TVariables>;
59
+ result: InternalQueryResult<TData, TVariables> | InternalQueryResult<any, TVariables>;
60
60
  obsQueryFields: Omit<ObservableQueryFields<TData, TVariables>, "variables">;
61
61
  observable: ObsQueryWithMeta<TData, TVariables>;
62
62
  resultData: InternalResult<TData, TVariables>;
@@ -3,7 +3,6 @@ import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
3
3
  import type { NoInfer, SubscriptionHookOptions } from "../types/types.js";
4
4
  import type { OperationVariables } from "../../core/index.js";
5
5
  import { ApolloError } from "../../core/index.js";
6
- import type { MaybeMasked } from "../../masking/index.js";
7
6
  /**
8
7
  * > Refer to the [Subscriptions](https://www.apollographql.com/docs/react/data/subscriptions/) section for a more in-depth overview of `useSubscription`.
9
8
  *
@@ -88,7 +87,7 @@ import type { MaybeMasked } from "../../masking/index.js";
88
87
  export declare function useSubscription<TData = any, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: SubscriptionHookOptions<NoInfer<TData>, NoInfer<TVariables>>): {
89
88
  restart: () => void;
90
89
  loading: boolean;
91
- data?: MaybeMasked<TData> | undefined;
90
+ data?: TData | undefined;
92
91
  error?: ApolloError;
93
92
  variables?: TVariables | undefined;
94
93
  };