@apollo/client 4.3.0-alpha.5 → 4.3.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/__cjs/cache/core/cache.cjs +1 -1
  3. package/__cjs/cache/inmemory/policies.cjs +24 -2
  4. package/__cjs/cache/inmemory/policies.cjs.map +1 -1
  5. package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
  6. package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
  7. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  8. package/__cjs/core/ObservableQuery.cjs +10 -9
  9. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  10. package/__cjs/core/ObservableQuery.d.cts +1 -1
  11. package/__cjs/core/QueryInfo.cjs +2 -11
  12. package/__cjs/core/QueryInfo.cjs.map +1 -1
  13. package/__cjs/core/QueryInfo.d.cts +2 -2
  14. package/__cjs/core/QueryManager.cjs +14 -11
  15. package/__cjs/core/QueryManager.cjs.map +1 -1
  16. package/__cjs/invariantErrorCodes.cjs +13 -8
  17. package/__cjs/utilities/internal/index.cjs +3 -1
  18. package/__cjs/utilities/internal/index.cjs.map +1 -1
  19. package/__cjs/utilities/internal/index.d.cts +1 -0
  20. package/__cjs/utilities/internal/toDiffWithDataState.cjs +20 -0
  21. package/__cjs/utilities/internal/toDiffWithDataState.cjs.map +1 -0
  22. package/__cjs/utilities/internal/toDiffWithDataState.d.cts +8 -0
  23. package/__cjs/version.cjs +1 -1
  24. package/cache/core/cache.js +1 -1
  25. package/cache/inmemory/policies.js +24 -2
  26. package/cache/inmemory/policies.js.map +1 -1
  27. package/cache/inmemory/readFromStore.js +3 -3
  28. package/cache/inmemory/readFromStore.js.map +1 -1
  29. package/cache/inmemory/writeToStore.js +4 -4
  30. package/core/ObservableQuery.d.ts +1 -1
  31. package/core/ObservableQuery.js +11 -10
  32. package/core/ObservableQuery.js.map +1 -1
  33. package/core/QueryInfo.d.ts +2 -2
  34. package/core/QueryInfo.js +3 -12
  35. package/core/QueryInfo.js.map +1 -1
  36. package/core/QueryManager.js +14 -11
  37. package/core/QueryManager.js.map +1 -1
  38. package/invariantErrorCodes.js +13 -8
  39. package/package.json +1 -1
  40. package/utilities/internal/index.d.ts +1 -0
  41. package/utilities/internal/index.js +1 -0
  42. package/utilities/internal/index.js.map +1 -1
  43. package/utilities/internal/toDiffWithDataState.d.ts +8 -0
  44. package/utilities/internal/toDiffWithDataState.js +17 -0
  45. package/utilities/internal/toDiffWithDataState.js.map +1 -0
  46. package/version.js +1 -1
@@ -519,23 +519,23 @@ const client = new ApolloClient({
519
519
  message: "Cannot automatically merge arrays"
520
520
  },
521
521
 
522
- 114: {
522
+ 115: {
523
523
  file: "@apollo/client/cache/inmemory/readFromStore.js",
524
524
  message: `No fragment named %s`
525
525
  },
526
526
 
527
- 115: {
527
+ 116: {
528
528
  file: "@apollo/client/cache/inmemory/readFromStore.js",
529
529
  condition: "!isReference(value)",
530
530
  message: `Missing selection set for object of type %s returned for query field %s`
531
531
  },
532
532
 
533
- 116: {
533
+ 117: {
534
534
  file: "@apollo/client/cache/inmemory/writeToStore.js",
535
535
  message: `Could not identify object %s`
536
536
  },
537
537
 
538
- 118: {
538
+ 119: {
539
539
  file: "@apollo/client/cache/inmemory/writeToStore.js",
540
540
  message: `No fragment named %s`
541
541
  }
@@ -722,11 +722,16 @@ For more information, please refer to the documentation:
722
722
  },
723
723
 
724
724
  113: {
725
+ file: "@apollo/client/cache/inmemory/policies.js",
726
+ message: "The field policy for '%s' is configured with the '%s' scalar, so its '%s' function is ignored. Scalar configuration cannot be used with custom read or merge functions."
727
+ },
728
+
729
+ 114: {
725
730
  file: "@apollo/client/cache/inmemory/readFromStore.js",
726
- message: "The field policy for '%s' is configured as a '%s' scalar, but the field is not a scalar field because it contains a selection set. The field value remains unchanged."
731
+ message: "The field policy for '%s' is configured with the '%s' scalar, but the field is not a scalar field because it contains a selection set. The field value remains unchanged."
727
732
  },
728
733
 
729
- 119: {
734
+ 120: {
730
735
  file: "@apollo/client/cache/inmemory/writeToStore.js",
731
736
 
732
737
  message: `Cache data may be lost when replacing the %s field of a %s object.
@@ -745,7 +750,7 @@ For more information about these options, please refer to the documentation:
745
750
  `
746
751
  },
747
752
 
748
- 120: {
753
+ 121: {
749
754
  file: "@apollo/client/cache/core/cache.js",
750
755
  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."
751
756
  }
@@ -767,7 +772,7 @@ export const devError = {
767
772
  message: "Unhandled GraphQL subscription error"
768
773
  },
769
774
 
770
- 117: {
775
+ 118: {
771
776
  file: "@apollo/client/cache/inmemory/writeToStore.js",
772
777
  message: `Missing field '%s' while writing result %o`
773
778
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo/client",
3
- "version": "4.3.0-alpha.5",
3
+ "version": "4.3.0-alpha.6",
4
4
  "description": "A fully-featured caching GraphQL client.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -73,6 +73,7 @@ export { shouldInclude } from "./shouldInclude.js";
73
73
  export { storeKeyNameFromField } from "./storeKeyNameFromField.js";
74
74
  export { StreamArrayState } from "./StreamArrayState.js";
75
75
  export { stringifyForDisplay } from "./stringifyForDisplay.js";
76
+ export { toDiffWithDataState } from "./toDiffWithDataState.js";
76
77
  export { toQueryResult } from "./toQueryResult.js";
77
78
  export { filterMap } from "./filterMap.js";
78
79
  export { equalByQuery } from "./equalByQuery.js";
@@ -52,6 +52,7 @@ export { shouldInclude } from "./shouldInclude.js";
52
52
  export { storeKeyNameFromField } from "./storeKeyNameFromField.js";
53
53
  export { StreamArrayState } from "./StreamArrayState.js";
54
54
  export { stringifyForDisplay } from "./stringifyForDisplay.js";
55
+ export { toDiffWithDataState } from "./toDiffWithDataState.js";
55
56
  export { toQueryResult } from "./toQueryResult.js";
56
57
  export { filterMap } from "./filterMap.js";
57
58
  export { equalByQuery } from "./equalByQuery.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/internal/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAA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AO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export type { DecoratedPromise } from \"./types/DecoratedPromise.js\";\nexport type { DeepOmit } from \"./types/DeepOmit.js\";\nexport type { ExtensionsWithStreamInfo } from \"./types/ExtensionsWithStreamDetails.js\";\nexport type { FragmentMap } from \"./types/FragmentMap.js\";\nexport type { FragmentMapFunction } from \"./types/FragmentMapFunction.js\";\nexport type { FulfilledPromise } from \"./types/FulfilledPromise.js\";\nexport type { IsAny } from \"./types/IsAny.js\";\nexport type { IsLooselyEqual } from \"./types/IsLooselyEqual.js\";\nexport type { NoInfer } from \"./types/NoInfer.js\";\nexport type { PendingPromise } from \"./types/PendingPromise.js\";\nexport type { Prettify } from \"./types/Prettify.js\";\nexport type { Primitive } from \"./types/Primitive.js\";\nexport type { RejectedPromise } from \"./types/RejectedPromise.js\";\nexport type { RemoveIndexSignature } from \"./types/RemoveIndexSignature.js\";\nexport type { StreamInfoTrie } from \"./types/StreamInfoTrie.js\";\nexport type { DeferInfoTrie } from \"./types/DeferInfo.js\";\nexport type { VariablesOption } from \"./types/VariablesOption.js\";\nexport type { DocumentationTypes } from \"./types/DocumentationTypes.js\";\nexport type { LazyType } from \"./LazyType.js\";\nexport type {\n ClassicSignature,\n SignatureStyle,\n} from \"./types/SignatureStyle.js\";\nexport type { OptionWithFallback } from \"./types/OptionWithFallback.js\";\n\nexport { addDeferFragmentLabels } from \"./addDeferFragmentLabels.js\";\nexport { argumentsObjectFromField } from \"./argumentsObjectFromField.js\";\nexport { canUseDOM } from \"./canUseDOM.js\";\nexport { checkDocument } from \"./checkDocument.js\";\nexport { cloneDeep } from \"./cloneDeep.js\";\nexport { combineLatestBatched } from \"./combineLatestBatched.js\";\nexport { compact } from \"./compact.js\";\nexport { createFragmentMap } from \"./createFragmentMap.js\";\nexport { createFulfilledPromise } from \"./createFulfilledPromise.js\";\nexport { createRejectedPromise } from \"./createRejectedPromise.js\";\nexport { dealias } from \"./dealias.js\";\nexport { decoratePromise } from \"./decoratePromise.js\";\nexport { DeepMerger } from \"./DeepMerger.js\";\nexport { getDefaultValues } from \"./getDefaultValues.js\";\nexport { getDirectiveArgValue } from \"./getDirectiveArgValue.js\";\nexport { getFragmentFromSelection } from \"./getFragmentFromSelection.js\";\nexport { getFragmentQueryDocument } from \"./getFragmentQueryDocument.js\";\nexport { getFragmentDefinition } from \"./getFragmentDefinition.js\";\nexport { getFragmentDefinitions } from \"./getFragmentDefinitions.js\";\nexport { getGraphQLErrorsFromResult } from \"./getGraphQLErrorsFromResult.js\";\nexport { getMainDefinition } from \"./getMainDefinition.js\";\nexport { getOperationDefinition } from \"./getOperationDefinition.js\";\nexport { getOperationName } from \"./getOperationName.js\";\nexport { getQueryDefinition } from \"./getQueryDefinition.js\";\nexport { getStoreKeyName } from \"./getStoreKeyName.js\";\nexport { getUnwrappedType } from \"./getUnwrappedType.js\";\nexport { graphQLResultHasError } from \"./graphQLResultHasError.js\";\nexport { hasDirectives } from \"./hasDirectives.js\";\nexport { hasForcedResolvers } from \"./hasForcedResolvers.js\";\nexport { isArray } from \"./isArray.js\";\nexport { isDeferredFragment } from \"./isDeferredFragment.js\";\nexport { isDocumentNode } from \"./isDocumentNode.js\";\nexport { isField } from \"./isField.js\";\nexport { isNonEmptyArray } from \"./isNonEmptyArray.js\";\nexport { isNonNullObject } from \"./isNonNullObject.js\";\nexport { isPlainObject } from \"./isPlainObject.js\";\nexport { isStreamField } from \"./isStreamField.js\";\nexport { isTypenameField } from \"./isTypenameField.js\";\nexport { makeStreamInfoTrie } from \"./makeStreamInfoTrie.js\";\nexport { makeReference } from \"./makeReference.js\";\nexport { makeUniqueId } from \"./makeUniqueId.js\";\nexport { maybeDeepFreeze } from \"./maybeDeepFreeze.js\";\nexport { mergeDeep } from \"./mergeDeep.js\";\nexport { mergeDeepArray } from \"./mergeDeepArray.js\";\nexport { mergeOptions } from \"./mergeOptions.js\";\nexport { omitDeep } from \"./omitDeep.js\";\nexport { preventUnhandledRejection } from \"./preventUnhandledRejection.js\";\nexport { removeDirectivesFromDocument } from \"./removeDirectivesFromDocument.js\";\nexport { removeMaskedFragmentSpreads } from \"./removeFragmentSpreads.js\";\nexport { resultKeyNameFromField } from \"./resultKeyNameFromField.js\";\nexport { shouldInclude } from \"./shouldInclude.js\";\nexport { storeKeyNameFromField } from \"./storeKeyNameFromField.js\";\nexport { StreamArrayState } from \"./StreamArrayState.js\";\nexport { stringifyForDisplay } from \"./stringifyForDisplay.js\";\nexport { toQueryResult } from \"./toQueryResult.js\";\nexport { filterMap } from \"./filterMap.js\";\nexport { equalByQuery } from \"./equalByQuery.js\";\nexport { canonicalStringify } from \"./canonicalStringify.js\";\nexport { mapObservableFragmentMemoized } from \"./mapObservableFragment.js\";\nexport {\n extensionsSymbol,\n handleIncrementalSymbol,\n streamInfoSymbol,\n variablesUnknownSymbol,\n} from \"./constants.js\";\nexport { bindCacheKey } from \"./bindCacheKey.js\";\n\nexport {\n getApolloCacheMemoryInternals,\n getApolloClientMemoryInternals,\n getInMemoryCacheMemoryInternals,\n registerGlobalCache,\n} from \"../internal/getMemoryInternals.js\";\n\nexport { AutoCleanedStrongCache, AutoCleanedWeakCache } from \"./caches.js\";\n\nexport type { ApplyHKT } from \"./types/ApplyHKT.js\";\nexport type { ApplyHKTImplementationWithDefault } from \"./types/ApplyHKTImplementationWithDefault.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/internal/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MA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AAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export type { DecoratedPromise } from \"./types/DecoratedPromise.js\";\nexport type { DeepOmit } from \"./types/DeepOmit.js\";\nexport type { ExtensionsWithStreamInfo } from \"./types/ExtensionsWithStreamDetails.js\";\nexport type { FragmentMap } from \"./types/FragmentMap.js\";\nexport type { FragmentMapFunction } from \"./types/FragmentMapFunction.js\";\nexport type { FulfilledPromise } from \"./types/FulfilledPromise.js\";\nexport type { IsAny } from \"./types/IsAny.js\";\nexport type { IsLooselyEqual } from \"./types/IsLooselyEqual.js\";\nexport type { NoInfer } from \"./types/NoInfer.js\";\nexport type { PendingPromise } from \"./types/PendingPromise.js\";\nexport type { Prettify } from \"./types/Prettify.js\";\nexport type { Primitive } from \"./types/Primitive.js\";\nexport type { RejectedPromise } from \"./types/RejectedPromise.js\";\nexport type { RemoveIndexSignature } from \"./types/RemoveIndexSignature.js\";\nexport type { StreamInfoTrie } from \"./types/StreamInfoTrie.js\";\nexport type { DeferInfoTrie } from \"./types/DeferInfo.js\";\nexport type { VariablesOption } from \"./types/VariablesOption.js\";\nexport type { DocumentationTypes } from \"./types/DocumentationTypes.js\";\nexport type { LazyType } from \"./LazyType.js\";\nexport type {\n ClassicSignature,\n SignatureStyle,\n} from \"./types/SignatureStyle.js\";\nexport type { OptionWithFallback } from \"./types/OptionWithFallback.js\";\n\nexport { addDeferFragmentLabels } from \"./addDeferFragmentLabels.js\";\nexport { argumentsObjectFromField } from \"./argumentsObjectFromField.js\";\nexport { canUseDOM } from \"./canUseDOM.js\";\nexport { checkDocument } from \"./checkDocument.js\";\nexport { cloneDeep } from \"./cloneDeep.js\";\nexport { combineLatestBatched } from \"./combineLatestBatched.js\";\nexport { compact } from \"./compact.js\";\nexport { createFragmentMap } from \"./createFragmentMap.js\";\nexport { createFulfilledPromise } from \"./createFulfilledPromise.js\";\nexport { createRejectedPromise } from \"./createRejectedPromise.js\";\nexport { dealias } from \"./dealias.js\";\nexport { decoratePromise } from \"./decoratePromise.js\";\nexport { DeepMerger } from \"./DeepMerger.js\";\nexport { getDefaultValues } from \"./getDefaultValues.js\";\nexport { getDirectiveArgValue } from \"./getDirectiveArgValue.js\";\nexport { getFragmentFromSelection } from \"./getFragmentFromSelection.js\";\nexport { getFragmentQueryDocument } from \"./getFragmentQueryDocument.js\";\nexport { getFragmentDefinition } from \"./getFragmentDefinition.js\";\nexport { getFragmentDefinitions } from \"./getFragmentDefinitions.js\";\nexport { getGraphQLErrorsFromResult } from \"./getGraphQLErrorsFromResult.js\";\nexport { getMainDefinition } from \"./getMainDefinition.js\";\nexport { getOperationDefinition } from \"./getOperationDefinition.js\";\nexport { getOperationName } from \"./getOperationName.js\";\nexport { getQueryDefinition } from \"./getQueryDefinition.js\";\nexport { getStoreKeyName } from \"./getStoreKeyName.js\";\nexport { getUnwrappedType } from \"./getUnwrappedType.js\";\nexport { graphQLResultHasError } from \"./graphQLResultHasError.js\";\nexport { hasDirectives } from \"./hasDirectives.js\";\nexport { hasForcedResolvers } from \"./hasForcedResolvers.js\";\nexport { isArray } from \"./isArray.js\";\nexport { isDeferredFragment } from \"./isDeferredFragment.js\";\nexport { isDocumentNode } from \"./isDocumentNode.js\";\nexport { isField } from \"./isField.js\";\nexport { isNonEmptyArray } from \"./isNonEmptyArray.js\";\nexport { isNonNullObject } from \"./isNonNullObject.js\";\nexport { isPlainObject } from \"./isPlainObject.js\";\nexport { isStreamField } from \"./isStreamField.js\";\nexport { isTypenameField } from \"./isTypenameField.js\";\nexport { makeStreamInfoTrie } from \"./makeStreamInfoTrie.js\";\nexport { makeReference } from \"./makeReference.js\";\nexport { makeUniqueId } from \"./makeUniqueId.js\";\nexport { maybeDeepFreeze } from \"./maybeDeepFreeze.js\";\nexport { mergeDeep } from \"./mergeDeep.js\";\nexport { mergeDeepArray } from \"./mergeDeepArray.js\";\nexport { mergeOptions } from \"./mergeOptions.js\";\nexport { omitDeep } from \"./omitDeep.js\";\nexport { preventUnhandledRejection } from \"./preventUnhandledRejection.js\";\nexport { removeDirectivesFromDocument } from \"./removeDirectivesFromDocument.js\";\nexport { removeMaskedFragmentSpreads } from \"./removeFragmentSpreads.js\";\nexport { resultKeyNameFromField } from \"./resultKeyNameFromField.js\";\nexport { shouldInclude } from \"./shouldInclude.js\";\nexport { storeKeyNameFromField } from \"./storeKeyNameFromField.js\";\nexport { StreamArrayState } from \"./StreamArrayState.js\";\nexport { stringifyForDisplay } from \"./stringifyForDisplay.js\";\nexport { toDiffWithDataState } from \"./toDiffWithDataState.js\";\nexport { toQueryResult } from \"./toQueryResult.js\";\nexport { filterMap } from \"./filterMap.js\";\nexport { equalByQuery } from \"./equalByQuery.js\";\nexport { canonicalStringify } from \"./canonicalStringify.js\";\nexport { mapObservableFragmentMemoized } from \"./mapObservableFragment.js\";\nexport {\n extensionsSymbol,\n handleIncrementalSymbol,\n streamInfoSymbol,\n variablesUnknownSymbol,\n} from \"./constants.js\";\nexport { bindCacheKey } from \"./bindCacheKey.js\";\n\nexport {\n getApolloCacheMemoryInternals,\n getApolloClientMemoryInternals,\n getInMemoryCacheMemoryInternals,\n registerGlobalCache,\n} from \"../internal/getMemoryInternals.js\";\n\nexport { AutoCleanedStrongCache, AutoCleanedWeakCache } from \"./caches.js\";\n\nexport type { ApplyHKT } from \"./types/ApplyHKT.js\";\nexport type { ApplyHKTImplementationWithDefault } from \"./types/ApplyHKTImplementationWithDefault.js\";\n"]}
@@ -0,0 +1,8 @@
1
+ import type { Cache } from "@apollo/client/cache";
2
+ /**
3
+ * @internal
4
+ *
5
+ * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
6
+ */
7
+ export declare function toDiffWithDataState<TData>(diff: Cache.DiffResult<TData> | Cache.InternalDiffResultWithDataState<TData>): Cache.InternalDiffResultWithDataState<TData>;
8
+ //# sourceMappingURL=toDiffWithDataState.d.ts.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
5
+ */
6
+ export function toDiffWithDataState(diff) {
7
+ if ("dataState" in diff) {
8
+ return diff;
9
+ }
10
+ return {
11
+ ...diff,
12
+ dataState: diff.complete ? "complete"
13
+ : diff.result === null ? "empty"
14
+ : "partial",
15
+ };
16
+ }
17
+ //# sourceMappingURL=toDiffWithDataState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toDiffWithDataState.js","sources":["../../../src/utilities/internal/toDiffWithDataState.ts"],"sourcesContent":["import type { Cache } from \"@apollo/client/cache\";\n\n/** @internal */\nexport function toDiffWithDataState<TData>(\n diff: Cache.DiffResult<TData> | Cache.InternalDiffResultWithDataState<TData>\n): Cache.InternalDiffResultWithDataState<TData> {\n if (\"dataState\" in diff) {\n return diff;\n }\n\n return {\n ...diff,\n dataState:\n diff.complete ? \"complete\"\n : diff.result === null ? \"empty\"\n : \"partial\",\n } as Cache.InternalDiffResultWithDataState<TData>;\n}\n"],"names":[],"mappings":";;;;;AAGA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAgB,CAAhB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmC,CACjC,CADF,CAAA,CAAA,CAC8E,EAD9E;IAGE,CAAF,EAAA,CAAM,CAAN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAqB,CAArB,CAAA,CAAA,CAAyB,EAAE;QACvB,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,CAAA,CAAA,CAAe;IACb;IAEA,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS;QACL,CAAJ,CAAA,CAAO,CAAP,CAAA,CAAA,CAAW;QACP,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EACP,CADN,CAAA,CAAA,CACU,CAAC,CADX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EACoB,EAAE,CADtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;YAEM,EAAE,CAAR,CAAA,CAAA,CAAY,CAAC,CAAb,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAwB,CAAxB,CAAA,CAAA,EAA6B,EAAE,CAA/B,CAAA,CAAA,CAAA,CAAA,CAAA;gBACM,EAAE,CAAR,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB;IACjB,CAAmD;AACnD;"}
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
- export const version = "4.3.0-alpha.5";
1
+ export const version = "4.3.0-alpha.6";
2
2
  export const build = "esm";
3
3
  //# sourceMappingURL=version.js.map