@apollo/client 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/__cjs/cache/core/cache.cjs +0 -10
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/core/ApolloClient.cjs +0 -82
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/link/core/ApolloLink.cjs +0 -7
- package/__cjs/link/core/ApolloLink.cjs.map +1 -1
- package/__cjs/version.cjs +1 -1
- package/cache/core/cache.js +0 -10
- package/cache/core/cache.js.map +1 -1
- package/core/ApolloClient.js +0 -82
- package/core/ApolloClient.js.map +1 -1
- package/link/core/ApolloLink.js +0 -7
- package/link/core/ApolloLink.js.map +1 -1
- package/package.json +1 -1
- package/version.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApolloLink.cjs","sources":["../../../../src/link/core/ApolloLink.ts"],"sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n OperationTypeNode,\n} from \"graphql\";\nimport type { Observable } from \"rxjs\";\nimport { EMPTY } from \"rxjs\";\n\nimport type {\n ApolloClient,\n DefaultContext,\n OperationVariables,\n} from \"@apollo/client\";\nimport type { TypeOverrides } from \"@apollo/client\";\nimport type { NotImplementedHandler } from \"@apollo/client/incremental\";\nimport { createOperation } from \"@apollo/client/link/utils\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport type { ApplyHKTImplementationWithDefault } from \"@apollo/client/utilities/internal\";\nimport {\n invariant,\n newInvariantError,\n} from \"@apollo/client/utilities/invariant\";\n\nexport declare namespace ApolloLink {\n /**\n * Context provided for link execution, such as the client executing the\n * request. It is separate from the request operation context.\n */\n export interface ExecuteContext {\n /**\n * The Apollo Client instance that executed the GraphQL request.\n */\n client: ApolloClient;\n }\n\n /** {@inheritDoc @apollo/client/link!ApolloLink.DocumentationTypes.ForwardFunction:function(1)} */\n export type ForwardFunction = (\n operation: ApolloLink.Operation\n ) => Observable<ApolloLink.Result>;\n\n /**\n * The input object provided to `ApolloLink.execute` to send a GraphQL request through\n * the link chain.\n */\n export interface Request {\n /**\n * The parsed GraphQL document that will be sent with the GraphQL request to\n * the server.\n */\n query: DocumentNode;\n\n /**\n * The variables provided for the query.\n */\n variables?: OperationVariables;\n\n /**\n * Context provided to the link chain. Context is not sent to the server and\n * is used to communicate additional metadata from a request to individual\n * links in the link chain.\n */\n context?: DefaultContext;\n\n /**\n * A map of extensions that will be sent with the GraphQL request to the\n * server.\n */\n extensions?: Record<string, any>;\n }\n\n /** {@inheritDoc @apollo/client/link!ApolloLink.DocumentationTypes.RequestHandler:function(1)} */\n export type RequestHandler = (\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ) => Observable<ApolloLink.Result>;\n\n export type AdditionalResultTypes<\n TData = Record<string, any>,\n TExtensions = Record<string, any>,\n > = ApplyHKTImplementationWithDefault<\n TypeOverrides,\n \"AdditionalApolloLinkResultTypes\",\n NotImplementedHandler.TypeOverrides,\n TData,\n TExtensions\n >;\n\n export type Result<\n TData = Record<string, any>,\n TExtensions = Record<string, any>,\n > =\n | FormattedExecutionResult<TData, TExtensions>\n | AdditionalResultTypes<TData, TExtensions>;\n\n /**\n * The currently executed operation object provided to an `ApolloLink.RequestHandler`\n * for each link in the link chain.\n */\n export interface Operation {\n /**\n * A `DocumentNode` that describes the operation taking place.\n */\n query: DocumentNode;\n\n /**\n * A map of GraphQL variables being sent with the operation.\n */\n variables: OperationVariables;\n\n /**\n * The string name of the GraphQL operation. If it is anonymous,\n * `operationName` will be `undefined`.\n */\n operationName: string | undefined;\n\n /**\n * The type of the GraphQL operation, such as query or mutation.\n */\n operationType: OperationTypeNode;\n\n /**\n * A map that stores extensions data to be sent to the server.\n */\n extensions: Record<string, any>;\n\n /**\n * A function that takes either a new context object, or a function which\n * takes in the previous context and returns a new one. See [managing\n * context](https://apollographql.com/docs/react/api/link/introduction#managing-context).\n */\n setContext: {\n (context: Partial<ApolloLink.OperationContext>): void;\n (\n updateContext: (\n previousContext: Readonly<ApolloLink.OperationContext>\n ) => Partial<ApolloLink.OperationContext>\n ): void;\n };\n\n /**\n * A function that gets the current context of the request. This can be used\n * by links to determine which actions to perform. See [managing context](https://apollographql.com/docs/react/api/link/introduction#managing-context)\n */\n getContext: () => Readonly<ApolloLink.OperationContext>;\n\n /**\n * The Apollo Client instance executing the request.\n */\n readonly client: ApolloClient;\n }\n\n /**\n * The `context` object that can be read and modified by links using the\n * `operation.getContext()` and `operation.setContext()` methods.\n */\n export interface OperationContext extends DefaultContext {}\n\n export namespace DocumentationTypes {\n /**\n * A request handler is responsible for performing some logic and executing the\n * request, either by [forwarding](https://apollographql.com/docs/react/api/link/introduction#the-request-handler) the operation to the next link in the\n * chain, or sending the operation to the destination that executes it, such as\n * a GraphQL server.\n *\n * @param operation - The `Operation` object that provides information about the\n * currently executed GraphQL request.\n *\n * @param forward - A function that is called to execute the next link in the\n * chain.\n */\n export function RequestHandler(\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ): Observable<ApolloLink.Result>;\n\n /**\n * A function that when called will execute the next link in the link chain.\n *\n * @example\n *\n * ```ts\n * const link = new ApolloLink((operation, forward) => {\n * // process the request\n *\n * // Call `forward` to execute the next link in the chain\n * return forward(operation);\n * });\n * ```\n *\n * @param operation - The current `ApolloLink.Operation` object for the\n * request.\n */\n export function ForwardFunction(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result>;\n }\n}\n\n/**\n * The base class for all links in Apollo Client. A link represents either a\n * self-contained modification to a GraphQL operation or a side effect (such as\n * logging).\n *\n * @remarks\n *\n * Links enable you to customize Apollo Client's request flow by composing\n * together different pieces of functionality into a chain of links. Each\n * link represents a specific capability, such as adding authentication headers,\n * retrying failed requests, batching operations, or sending requests to a\n * GraphQL server.\n *\n * Every link must define a request handler via its constructor or by extending\n * this class and implementing the `request` method.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink } from \"@apollo/client\";\n *\n * const link = new ApolloLink((operation, forward) => {\n * console.log(\"Operation:\", operation.operationName);\n * return forward(operation);\n * });\n * ```\n */\nexport class ApolloLink {\n /**\n * Creates a link that completes immediately and does not emit a result.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.empty();\n * ```\n */\n public static empty(): ApolloLink {\n return new ApolloLink(() => EMPTY);\n }\n\n /**\n * Composes multiple links into a single composed link that executes each\n * provided link in serial order.\n *\n * @example\n *\n * ```ts\n * import { from, HttpLink, ApolloLink } from \"@apollo/client\";\n * import { RetryLink } from \"@apollo/client/link/retry\";\n * import MyAuthLink from \"../auth\";\n *\n * const link = ApolloLink.from([\n * new RetryLink(),\n * new MyAuthLink(),\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n * ]);\n * ```\n *\n * @param links - An array of `ApolloLink` instances or request handlers that\n * are executed in serial order.\n */\n public static from(links: ApolloLink[]): ApolloLink {\n if (links.length === 0) return ApolloLink.empty();\n\n const [first, ...rest] = links;\n return first.concat(...rest);\n }\n\n /**\n * Creates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const link = ApolloLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n public static split(\n test: (op: ApolloLink.Operation) => boolean,\n left: ApolloLink,\n right: ApolloLink = new ApolloLink((op, forward) => forward(op))\n ): ApolloLink {\n const link = new ApolloLink((operation, forward) => {\n const result = test(operation);\n\n if (__DEV__) {\n if (typeof result !== \"boolean\") {\n invariant.warn(\n \"[ApolloLink.split]: The test function returned a non-boolean value which could result in subtle bugs (e.g. such as using an `async` function which always returns a truthy value). Got `%o`.\",\n result\n );\n }\n }\n\n return result ?\n left.request(operation, forward)\n : right.request(operation, forward);\n });\n return Object.assign(link, { left, right });\n }\n\n /**\n * Executes a GraphQL request against a link. The `execute` function begins\n * the request by calling the request handler of the link.\n *\n * @example\n *\n * ```ts\n * const observable = ApolloLink.execute(link, { query, variables }, { client });\n *\n * observable.subscribe({\n * next(value) {\n * console.log(\"Received\", value);\n * },\n * error(error) {\n * console.error(\"Oops got error\", error);\n * },\n * complete() {\n * console.log(\"Request complete\");\n * },\n * });\n * ```\n *\n * @param link - The `ApolloLink` instance to execute the request.\n *\n * @param request - The GraphQL request details, such as the `query` and\n * `variables`.\n *\n * @param context - The execution context for the request, such as the\n * `client` making the request.\n */\n public static execute(\n link: ApolloLink,\n request: ApolloLink.Request,\n context: ApolloLink.ExecuteContext\n ): Observable<ApolloLink.Result> {\n return link.request(createOperation(request, context), () => {\n if (__DEV__) {\n invariant.warn(\n \"The terminating link provided to `ApolloLink.execute` called `forward` instead of handling the request. \" +\n \"This results in an observable that immediately completes and does not emit a value. \" +\n \"Please provide a terminating link that properly handles the request.\\n\\n\" +\n \"If you are using a split link, ensure each branch contains a terminating link that handles the request.\"\n );\n }\n return EMPTY;\n });\n }\n\n /**\n * Combines multiple links into a single composed link.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.concat(firstLink, secondLink, thirdLink);\n * ```\n *\n * @param links - The links to concatenate into a single link. Each link will\n * execute in serial order.\n *\n * @deprecated Use `ApolloLink.from` instead. `ApolloLink.concat` will be\n * removed in a future major version.\n */\n public static concat(...links: ApolloLink[]) {\n return ApolloLink.from(links);\n }\n\n constructor(request?: ApolloLink.RequestHandler) {\n if (request) this.request = request;\n }\n\n /**\n * Concatenates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n public split(\n test: (op: ApolloLink.Operation) => boolean,\n left: ApolloLink,\n right?: ApolloLink\n ): ApolloLink {\n return this.concat(ApolloLink.split(test, left, right));\n }\n\n /**\n * Combines the link with other links into a single composed link.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.concat(\n * link1,\n * link2,\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" })\n * );\n * ```\n */\n public concat(...links: ApolloLink[]): ApolloLink {\n if (links.length === 0) {\n return this;\n }\n\n return links.reduce(this.combine.bind(this), this);\n }\n\n private combine(left: ApolloLink, right: ApolloLink) {\n const link = new ApolloLink((operation, forward) => {\n return left.request(operation, (op) => right.request(op, forward));\n });\n\n return Object.assign(link, { left, right });\n }\n\n /**\n * Runs the request handler for the provided operation.\n *\n * > [!NOTE]\n * > This is called by the `ApolloLink.execute` function for you and should\n * > not be called directly. Prefer using `ApolloLink.execute` to make the\n * > request instead.\n */\n public request(\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ): Observable<ApolloLink.Result> {\n throw newInvariantError(\"request is not implemented\");\n }\n\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly left?: ApolloLink;\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly right?: ApolloLink;\n\n /**\n * @internal\n * Can be provided by a link that has an internal cache to report it's memory details.\n */\n getMemoryInternals?: () => unknown;\n}\n"],"names":[],"mappings":";;;;;;;AAMA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AASA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ApolloLink.cjs","sources":["../../../../src/link/core/ApolloLink.ts"],"sourcesContent":["import type {\n DocumentNode,\n FormattedExecutionResult,\n OperationTypeNode,\n} from \"graphql\";\nimport type { Observable } from \"rxjs\";\nimport { EMPTY } from \"rxjs\";\n\nimport type {\n ApolloClient,\n DefaultContext,\n OperationVariables,\n} from \"@apollo/client\";\nimport type { TypeOverrides } from \"@apollo/client\";\nimport type { NotImplementedHandler } from \"@apollo/client/incremental\";\nimport { createOperation } from \"@apollo/client/link/utils\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport type { ApplyHKTImplementationWithDefault } from \"@apollo/client/utilities/internal\";\nimport {\n invariant,\n newInvariantError,\n} from \"@apollo/client/utilities/invariant\";\n\nexport declare namespace ApolloLink {\n /**\n * Context provided for link execution, such as the client executing the\n * request. It is separate from the request operation context.\n */\n export interface ExecuteContext {\n /**\n * The Apollo Client instance that executed the GraphQL request.\n */\n client: ApolloClient;\n }\n\n /** {@inheritDoc @apollo/client/link!ApolloLink.DocumentationTypes.ForwardFunction:function(1)} */\n export type ForwardFunction = (\n operation: ApolloLink.Operation\n ) => Observable<ApolloLink.Result>;\n\n /**\n * The input object provided to `ApolloLink.execute` to send a GraphQL request through\n * the link chain.\n */\n export interface Request {\n /**\n * The parsed GraphQL document that will be sent with the GraphQL request to\n * the server.\n */\n query: DocumentNode;\n\n /**\n * The variables provided for the query.\n */\n variables?: OperationVariables;\n\n /**\n * Context provided to the link chain. Context is not sent to the server and\n * is used to communicate additional metadata from a request to individual\n * links in the link chain.\n */\n context?: DefaultContext;\n\n /**\n * A map of extensions that will be sent with the GraphQL request to the\n * server.\n */\n extensions?: Record<string, any>;\n }\n\n /** {@inheritDoc @apollo/client/link!ApolloLink.DocumentationTypes.RequestHandler:function(1)} */\n export type RequestHandler = (\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ) => Observable<ApolloLink.Result>;\n\n export type AdditionalResultTypes<\n TData = Record<string, any>,\n TExtensions = Record<string, any>,\n > = ApplyHKTImplementationWithDefault<\n TypeOverrides,\n \"AdditionalApolloLinkResultTypes\",\n NotImplementedHandler.TypeOverrides,\n TData,\n TExtensions\n >;\n\n export type Result<\n TData = Record<string, any>,\n TExtensions = Record<string, any>,\n > =\n | FormattedExecutionResult<TData, TExtensions>\n | AdditionalResultTypes<TData, TExtensions>;\n\n /**\n * The currently executed operation object provided to an `ApolloLink.RequestHandler`\n * for each link in the link chain.\n */\n export interface Operation {\n /**\n * A `DocumentNode` that describes the operation taking place.\n */\n query: DocumentNode;\n\n /**\n * A map of GraphQL variables being sent with the operation.\n */\n variables: OperationVariables;\n\n /**\n * The string name of the GraphQL operation. If it is anonymous,\n * `operationName` will be `undefined`.\n */\n operationName: string | undefined;\n\n /**\n * The type of the GraphQL operation, such as query or mutation.\n */\n operationType: OperationTypeNode;\n\n /**\n * A map that stores extensions data to be sent to the server.\n */\n extensions: Record<string, any>;\n\n /**\n * A function that takes either a new context object, or a function which\n * takes in the previous context and returns a new one. See [managing\n * context](https://apollographql.com/docs/react/api/link/introduction#managing-context).\n */\n setContext: {\n (context: Partial<ApolloLink.OperationContext>): void;\n (\n updateContext: (\n previousContext: Readonly<ApolloLink.OperationContext>\n ) => Partial<ApolloLink.OperationContext>\n ): void;\n };\n\n /**\n * A function that gets the current context of the request. This can be used\n * by links to determine which actions to perform. See [managing context](https://apollographql.com/docs/react/api/link/introduction#managing-context)\n */\n getContext: () => Readonly<ApolloLink.OperationContext>;\n\n /**\n * The Apollo Client instance executing the request.\n */\n readonly client: ApolloClient;\n }\n\n /**\n * The `context` object that can be read and modified by links using the\n * `operation.getContext()` and `operation.setContext()` methods.\n */\n export interface OperationContext extends DefaultContext {}\n\n export namespace DocumentationTypes {\n /**\n * A request handler is responsible for performing some logic and executing the\n * request, either by [forwarding](https://apollographql.com/docs/react/api/link/introduction#the-request-handler) the operation to the next link in the\n * chain, or sending the operation to the destination that executes it, such as\n * a GraphQL server.\n *\n * @param operation - The `Operation` object that provides information about the\n * currently executed GraphQL request.\n *\n * @param forward - A function that is called to execute the next link in the\n * chain.\n */\n export function RequestHandler(\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ): Observable<ApolloLink.Result>;\n\n /**\n * A function that when called will execute the next link in the link chain.\n *\n * @example\n *\n * ```ts\n * const link = new ApolloLink((operation, forward) => {\n * // process the request\n *\n * // Call `forward` to execute the next link in the chain\n * return forward(operation);\n * });\n * ```\n *\n * @param operation - The current `ApolloLink.Operation` object for the\n * request.\n */\n export function ForwardFunction(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result>;\n }\n}\n\n/**\n * The base class for all links in Apollo Client. A link represents either a\n * self-contained modification to a GraphQL operation or a side effect (such as\n * logging).\n *\n * @remarks\n *\n * Links enable you to customize Apollo Client's request flow by composing\n * together different pieces of functionality into a chain of links. Each\n * link represents a specific capability, such as adding authentication headers,\n * retrying failed requests, batching operations, or sending requests to a\n * GraphQL server.\n *\n * Every link must define a request handler via its constructor or by extending\n * this class and implementing the `request` method.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink } from \"@apollo/client\";\n *\n * const link = new ApolloLink((operation, forward) => {\n * console.log(\"Operation:\", operation.operationName);\n * return forward(operation);\n * });\n * ```\n */\nexport class ApolloLink {\n /**\n * Creates a link that completes immediately and does not emit a result.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.empty();\n * ```\n */\n public static empty(): ApolloLink {\n return new ApolloLink(() => EMPTY);\n }\n\n /**\n * Composes multiple links into a single composed link that executes each\n * provided link in serial order.\n *\n * @example\n *\n * ```ts\n * import { from, HttpLink, ApolloLink } from \"@apollo/client\";\n * import { RetryLink } from \"@apollo/client/link/retry\";\n * import MyAuthLink from \"../auth\";\n *\n * const link = ApolloLink.from([\n * new RetryLink(),\n * new MyAuthLink(),\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n * ]);\n * ```\n *\n * @param links - An array of `ApolloLink` instances or request handlers that\n * are executed in serial order.\n */\n public static from(links: ApolloLink[]): ApolloLink {\n if (links.length === 0) return ApolloLink.empty();\n\n const [first, ...rest] = links;\n return first.concat(...rest);\n }\n\n /**\n * Creates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const link = ApolloLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n public static split(\n test: (op: ApolloLink.Operation) => boolean,\n left: ApolloLink,\n right: ApolloLink = new ApolloLink((op, forward) => forward(op))\n ): ApolloLink {\n const link = new ApolloLink((operation, forward) => {\n const result = test(operation);\n\n if (__DEV__) {\n if (typeof result !== \"boolean\") {\n invariant.warn(\n \"[ApolloLink.split]: The test function returned a non-boolean value which could result in subtle bugs (e.g. such as using an `async` function which always returns a truthy value). Got `%o`.\",\n result\n );\n }\n }\n\n return result ?\n left.request(operation, forward)\n : right.request(operation, forward);\n });\n return Object.assign(link, { left, right });\n }\n\n /**\n * Executes a GraphQL request against a link. The `execute` function begins\n * the request by calling the request handler of the link.\n *\n * @example\n *\n * ```ts\n * const observable = ApolloLink.execute(link, { query, variables }, { client });\n *\n * observable.subscribe({\n * next(value) {\n * console.log(\"Received\", value);\n * },\n * error(error) {\n * console.error(\"Oops got error\", error);\n * },\n * complete() {\n * console.log(\"Request complete\");\n * },\n * });\n * ```\n *\n * @param link - The `ApolloLink` instance to execute the request.\n *\n * @param request - The GraphQL request details, such as the `query` and\n * `variables`.\n *\n * @param context - The execution context for the request, such as the\n * `client` making the request.\n */\n public static execute(\n link: ApolloLink,\n request: ApolloLink.Request,\n context: ApolloLink.ExecuteContext\n ): Observable<ApolloLink.Result> {\n return link.request(createOperation(request, context), () => {\n if (__DEV__) {\n invariant.warn(\n \"The terminating link provided to `ApolloLink.execute` called `forward` instead of handling the request. \" +\n \"This results in an observable that immediately completes and does not emit a value. \" +\n \"Please provide a terminating link that properly handles the request.\\n\\n\" +\n \"If you are using a split link, ensure each branch contains a terminating link that handles the request.\"\n );\n }\n return EMPTY;\n });\n }\n\n /**\n * Combines multiple links into a single composed link.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.concat(firstLink, secondLink, thirdLink);\n * ```\n *\n * @param links - The links to concatenate into a single link. Each link will\n * execute in serial order.\n *\n * @deprecated Use `ApolloLink.from` instead. `ApolloLink.concat` will be\n * removed in a future major version.\n */\n public static concat(...links: ApolloLink[]) {\n return ApolloLink.from(links);\n }\n\n constructor(request?: ApolloLink.RequestHandler) {\n if (request) this.request = request;\n }\n\n /**\n * Concatenates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n public split(\n test: (op: ApolloLink.Operation) => boolean,\n left: ApolloLink,\n right?: ApolloLink\n ): ApolloLink {\n return this.concat(ApolloLink.split(test, left, right));\n }\n\n /**\n * Combines the link with other links into a single composed link.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.concat(\n * link1,\n * link2,\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" })\n * );\n * ```\n */\n public concat(...links: ApolloLink[]): ApolloLink {\n if (links.length === 0) {\n return this;\n }\n\n return links.reduce(this.combine.bind(this), this);\n }\n\n private combine(left: ApolloLink, right: ApolloLink) {\n const link = new ApolloLink((operation, forward) => {\n return left.request(operation, (op) => right.request(op, forward));\n });\n\n return Object.assign(link, { left, right });\n }\n\n /**\n * Runs the request handler for the provided operation.\n *\n * > [!NOTE]\n * > This is called by the `ApolloLink.execute` function for you and should\n * > not be called directly. Prefer using `ApolloLink.execute` to make the\n * > request instead.\n */\n public request(\n operation: ApolloLink.Operation,\n forward: ApolloLink.ForwardFunction\n ): Observable<ApolloLink.Result> {\n throw newInvariantError(\"request is not implemented\");\n }\n\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly left?: ApolloLink;\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n */\n readonly right?: ApolloLink;\n\n /**\n * @internal\n * Can be provided by a link that has an internal cache to report it's memory details.\n */\n declare getMemoryInternals?: () => unknown;\n}\n"],"names":[],"mappings":";;;;;;;AAMA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AASA,CAAA,CAAA,CAA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,EAAW,CAAX,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAlB,CAAA,CAAA,CAAA,CAAA,CAAwB,CAAC,CAAzB,CAAA,CAAA,CAA6B,EAAE,EAAE,CAAjC,CAAA,CAAA,CAAqC,EAAE,CAAvC,CAAA,CAAA,CAAA,EAAA,CAA8C,CAAC;IAC7C;IAEA,CAAF,CAAA;;;;;;;KAOA,CAAA;IACS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,CACZ,CADJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACmC,EAC/B,CAFJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAEuC,EAFvC;QAII,CAAJ,CAAA,CAAA,CAAA,GAAA,GAAU,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAyD;IACvD;;;;;;;IAMS,CAAX,CAAA,CAAA,CAAe;;;;;;;IAKJ,CAAX,CAAA,CAAA,CAAA,CAAgB;AAOhB;AA/QA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
|
package/__cjs/version.cjs
CHANGED
package/cache/core/cache.js
CHANGED
|
@@ -182,16 +182,6 @@ export class ApolloCache {
|
|
|
182
182
|
},
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
/**
|
|
186
|
-
* @experimental
|
|
187
|
-
* @internal
|
|
188
|
-
* This is not a stable API - it is used in development builds to expose
|
|
189
|
-
* information to the DevTools.
|
|
190
|
-
* Use at your own risk!
|
|
191
|
-
*
|
|
192
|
-
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
193
|
-
*/
|
|
194
|
-
getMemoryInternals;
|
|
195
185
|
}
|
|
196
186
|
if (__DEV__) {
|
|
197
187
|
ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;
|
package/cache/core/cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sources":["../../../src/cache/core/cache.ts"],"sourcesContent":["import { WeakCache } from \"@wry/caches\";\nimport type {\n DocumentNode,\n FragmentDefinitionNode,\n InlineFragmentNode,\n} from \"graphql\";\nimport { wrap } from \"optimism\";\nimport { Observable } from \"rxjs\";\n\nimport type {\n GetDataState,\n OperationVariables,\n TypedDocumentNode,\n} from \"@apollo/client\";\nimport type { FragmentType, Unmasked } from \"@apollo/client/masking\";\nimport type { Reference, StoreObject } from \"@apollo/client/utilities\";\nimport { cacheSizes } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport type { NoInfer } from \"@apollo/client/utilities/internal\";\nimport {\n equalByQuery,\n getApolloCacheMemoryInternals,\n getFragmentDefinition,\n getFragmentQueryDocument,\n} from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport { defaultCacheSizes } from \"../../utilities/caching/sizes.js\";\n\nimport type { Cache } from \"./types/Cache.js\";\nimport type { MissingTree } from \"./types/common.js\";\n\nexport type Transaction = (c: ApolloCache) => void;\n\nexport declare namespace ApolloCache {\n /**\n * Watched fragment options.\n */\n export interface WatchFragmentOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > {\n /**\n * A GraphQL fragment document parsed into an AST with the `gql`\n * template literal.\n *\n * @docGroup 1. Required options\n */\n fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;\n /**\n * An object containing a `__typename` and primary key fields\n * (such as `id`) identifying the entity object from which the fragment will\n * be retrieved, or a `{ __ref: \"...\" }` reference, or a `string` ID\n * (uncommon).\n *\n * @docGroup 1. Required options\n */\n from: StoreObject | Reference | FragmentType<NoInfer<TData>> | string;\n /**\n * Any variables that the GraphQL fragment may depend on.\n *\n * @docGroup 2. Cache options\n */\n variables?: TVariables;\n /**\n * The name of the fragment defined in the fragment document.\n *\n * Required if the fragment document includes more than one fragment,\n * optional otherwise.\n *\n * @docGroup 2. Cache options\n */\n fragmentName?: string;\n /**\n * If `true`, `watchFragment` returns optimistic results.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Cache options\n */\n optimistic?: boolean;\n }\n\n /**\n * Watched fragment results.\n */\n export type WatchFragmentResult<TData = unknown> =\n | ({\n complete: true;\n missing?: never;\n } & GetDataState<TData, \"complete\">)\n | ({\n complete: false;\n missing: MissingTree;\n } & GetDataState<TData, \"partial\">);\n}\n\nexport abstract class ApolloCache {\n public readonly assumeImmutableResults: boolean = false;\n\n // required to implement\n // core API\n public abstract read<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(query: Cache.ReadOptions<TData, TVariables>): Unmasked<TData> | null;\n public abstract write<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(write: Cache.WriteOptions<TData, TVariables>): Reference | undefined;\n\n /**\n * Returns data read from the cache for a given query along with information\n * about the cache result such as whether the result is complete and details\n * about missing fields.\n *\n * Will return `complete` as `true` if it can fulfill the full cache result or\n * `false` if not. When no data can be fulfilled from the cache, `null` is\n * returned. When `returnPartialData` is `true`, non-null partial results are\n * returned if it contains at least one field that can be fulfilled from the\n * cache.\n */\n public abstract diff<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(query: Cache.DiffOptions<TData, TVariables>): Cache.DiffResult<TData>;\n public abstract watch<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(watch: Cache.WatchOptions<TData, TVariables>): () => void;\n\n // Empty the cache and restart all current watches (unless\n // options.discardWatches is true).\n public abstract reset(options?: Cache.ResetOptions): Promise<void>;\n\n // Remove whole objects from the cache by passing just options.id, or\n // specific fields by passing options.field and/or options.args. If no\n // options.args are provided, all fields matching options.field (even\n // those with arguments) will be removed. Returns true iff any data was\n // removed from the cache.\n public abstract evict(options: Cache.EvictOptions): boolean;\n\n // initializer / offline / ssr API\n /**\n * Replaces existing state in the cache (if any) with the values expressed by\n * `serializedState`.\n *\n * Called when hydrating a cache (server side rendering, or offline storage),\n * and also (potentially) during hot reloads.\n */\n public abstract restore(serializedState: unknown): this;\n\n /**\n * Exposes the cache's complete state, in a serializable format for later restoration.\n */\n public abstract extract(optimistic?: boolean): unknown;\n\n // Optimistic API\n\n public abstract removeOptimistic(id: string): void;\n\n // Used by data masking to determine if an inline fragment with a type\n // condition matches a given typename. Also used by local resolvers to match a\n // fragment against a typename.\n //\n // If not implemented by a cache subclass, data masking will effectively be\n // disabled since we will not be able to accurately determine if a given type\n // condition for a union or interface matches a particular type.\n public abstract fragmentMatches(\n fragment: InlineFragmentNode | FragmentDefinitionNode,\n typename: string\n ): boolean;\n\n // Function used to lookup a fragment when a fragment definition is not part\n // of the GraphQL document. This is useful for caches, such as InMemoryCache,\n // that register fragments ahead of time so they can be referenced by name.\n public lookupFragment(fragmentName: string): FragmentDefinitionNode | null {\n return null;\n }\n\n // Transactional API\n\n // The batch method is intended to replace/subsume both performTransaction\n // and recordOptimisticTransaction, but performTransaction came first, so we\n // provide a default batch implementation that's just another way of calling\n // performTransaction. Subclasses of ApolloCache (such as InMemoryCache) can\n // override the batch method to do more interesting things with its options.\n public batch<U>(options: Cache.BatchOptions<this, U>): U {\n const optimisticId =\n typeof options.optimistic === \"string\" ? options.optimistic\n : options.optimistic === false ? null\n : void 0;\n let updateResult: U;\n this.performTransaction(\n () => (updateResult = options.update(this)),\n optimisticId\n );\n return updateResult!;\n }\n\n public abstract performTransaction(\n transaction: Transaction,\n // Although subclasses may implement recordOptimisticTransaction\n // however they choose, the default implementation simply calls\n // performTransaction with a string as the second argument, allowing\n // performTransaction to handle both optimistic and non-optimistic\n // (broadcast-batching) transactions. Passing null for optimisticId is\n // also allowed, and indicates that performTransaction should apply\n // the transaction non-optimistically (ignoring optimistic data).\n optimisticId?: string | null\n ): void;\n\n public recordOptimisticTransaction(\n transaction: Transaction,\n optimisticId: string\n ) {\n this.performTransaction(transaction, optimisticId);\n }\n\n // Optional API\n\n // Called once per input document, allowing the cache to make static changes\n // to the query, such as adding __typename fields.\n public transformDocument(document: DocumentNode): DocumentNode {\n return document;\n }\n\n // Called before each ApolloLink request, allowing the cache to make dynamic\n // changes to the query, such as filling in missing fragment definitions.\n public transformForLink(document: DocumentNode): DocumentNode {\n return document;\n }\n\n public identify(object: StoreObject | Reference): string | undefined {\n return;\n }\n\n public gc(): string[] {\n return [];\n }\n\n public modify<Entity extends Record<string, any> = Record<string, any>>(\n options: Cache.ModifyOptions<Entity>\n ): boolean {\n return false;\n }\n\n /**\n * Read data from the cache for the specified query.\n */\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n query,\n variables,\n id,\n optimistic,\n returnPartialData,\n }: Cache.ReadQueryOptions<TData, TVariables>): Unmasked<TData> | null;\n /**\n * {@inheritDoc @apollo/client!ApolloCache#readQuery:member(1)}\n */\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadQueryOptions<TData, TVariables>,\n /**\n * @deprecated Pass the `optimistic` argument as part of the first argument\n * instead of passing it as a separate option.\n */\n optimistic: boolean\n ): Unmasked<TData> | null;\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadQueryOptions<TData, TVariables>,\n optimistic = !!options.optimistic\n ): Unmasked<TData> | null {\n return this.read({\n ...options,\n rootId: options.id || \"ROOT_QUERY\",\n optimistic,\n });\n }\n\n /** {@inheritDoc @apollo/client!ApolloClient#watchFragment:member(1)} */\n public watchFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: ApolloCache.WatchFragmentOptions<TData, TVariables>\n ): Observable<ApolloCache.WatchFragmentResult<Unmasked<TData>>> {\n const {\n fragment,\n fragmentName,\n from,\n optimistic = true,\n ...otherOptions\n } = options;\n const query = this.getFragmentDoc(fragment, fragmentName);\n // While our TypeScript types do not allow for `undefined` as a valid\n // `from`, its possible `useFragment` gives us an `undefined` since it\n // calls` cache.identify` and provides that value to `from`. We are\n // adding this fix here however to ensure those using plain JavaScript\n // and using `cache.identify` themselves will avoid seeing the obscure\n // warning.\n const id =\n typeof from === \"undefined\" || typeof from === \"string\" ?\n from\n : this.identify(from);\n\n if (__DEV__) {\n const actualFragmentName =\n fragmentName || getFragmentDefinition(fragment).name.value;\n\n if (!id) {\n invariant.warn(\n \"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 actualFragmentName\n );\n }\n }\n\n const diffOptions: Cache.DiffOptions<TData, TVariables> = {\n ...otherOptions,\n returnPartialData: true,\n id,\n query,\n optimistic,\n };\n\n let latestDiff: Cache.DiffResult<TData> | undefined;\n\n return new Observable((observer) => {\n return this.watch<TData, TVariables>({\n ...diffOptions,\n immediate: true,\n callback: (diff) => {\n let data = diff.result;\n\n // TODO: Remove this once `watchFragment` supports `null` as valid\n // value emitted\n if (data === null) {\n data = {} as any;\n }\n\n if (\n // Always ensure we deliver the first result\n latestDiff &&\n equalByQuery(\n query,\n { data: latestDiff.result },\n { data },\n options.variables\n )\n ) {\n return;\n }\n\n const result = {\n data,\n dataState: diff.complete ? \"complete\" : \"partial\",\n complete: !!diff.complete,\n } as ApolloCache.WatchFragmentResult<Unmasked<TData>>;\n\n if (diff.missing) {\n result.missing = diff.missing.missing;\n }\n\n latestDiff = { ...diff, result: data } as Cache.DiffResult<TData>;\n observer.next(result);\n },\n });\n });\n }\n\n // Make sure we compute the same (===) fragment query document every\n // time we receive the same fragment in readFragment.\n private getFragmentDoc = wrap(getFragmentQueryDocument, {\n max:\n cacheSizes[\"cache.fragmentQueryDocuments\"] ||\n defaultCacheSizes[\"cache.fragmentQueryDocuments\"],\n cache: WeakCache,\n });\n\n /**\n * Read data from the cache for the specified fragment.\n */\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n fragment,\n variables,\n fragmentName,\n id,\n optimistic,\n returnPartialData,\n }: Cache.ReadFragmentOptions<TData, TVariables>): Unmasked<TData> | null;\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadFragmentOptions<TData, TVariables>,\n /**\n * @deprecated Pass the `optimistic` argument as part of the first argument\n * instead of passing it as a separate option.\n */\n optimistic: boolean\n ): Unmasked<TData> | null;\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadFragmentOptions<TData, TVariables>,\n optimistic = !!options.optimistic\n ): Unmasked<TData> | null {\n return this.read({\n ...options,\n query: this.getFragmentDoc(options.fragment, options.fragmentName),\n rootId: options.id,\n optimistic,\n });\n }\n\n /**\n * Writes data to the root of the cache using the specified query to validate that\n * the shape of the data you’re writing to the cache is the same as the shape of\n * the data required by the query. Great for prepping the cache with initial data.\n */\n public writeQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n data,\n query,\n variables,\n overwrite,\n id,\n broadcast,\n }: Cache.WriteQueryOptions<TData, TVariables>): Reference | undefined;\n public writeQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n id,\n data,\n ...options\n }: Cache.WriteQueryOptions<TData, TVariables>): Reference | undefined {\n return this.write(\n Object.assign(options, {\n dataId: id || \"ROOT_QUERY\",\n result: data,\n })\n );\n }\n\n /**\n * Similar to `writeQuery` (writes data to the cache) but uses the specified\n * fragment to validate that the shape of the data you’re writing to the cache\n * is the same as the shape of the data required by the fragment.\n */\n public writeFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n data,\n fragment,\n fragmentName,\n variables,\n overwrite,\n id,\n broadcast,\n }: Cache.WriteFragmentOptions<TData, TVariables>): Reference | undefined;\n public writeFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n id,\n data,\n fragment,\n fragmentName,\n ...options\n }: Cache.WriteFragmentOptions<TData, TVariables>): Reference | undefined {\n return this.write(\n Object.assign(options, {\n query: this.getFragmentDoc(fragment, fragmentName),\n dataId: id,\n result: data,\n })\n );\n }\n\n public updateQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.UpdateQueryOptions<TData, TVariables>,\n update: (data: Unmasked<TData> | null) => Unmasked<TData> | null | void\n ): Unmasked<TData> | null {\n return this.batch({\n update(cache) {\n const value = cache.readQuery<TData, TVariables>(options);\n const data = update(value);\n if (data === void 0 || data === null) return value;\n cache.writeQuery<TData, TVariables>({ ...options, data });\n return data;\n },\n });\n }\n\n public updateFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.UpdateFragmentOptions<TData, TVariables>,\n update: (data: Unmasked<TData> | null) => Unmasked<TData> | null | void\n ): Unmasked<TData> | null {\n return this.batch({\n update(cache) {\n const value = cache.readFragment<TData, TVariables>(options);\n const data = update(value);\n if (data === void 0 || data === null) return value;\n cache.writeFragment<TData, TVariables>({ ...options, data });\n return data;\n },\n });\n }\n\n /**\n * @experimental\n * @internal\n * This is not a stable API - it is used in development builds to expose\n * information to the DevTools.\n * Use at your own risk!\n */\n public getMemoryInternals?: typeof getApolloCacheMemoryInternals;\n}\n\nif (__DEV__) {\n ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA0B,CAA1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAA6C,CAA7C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0E;AAC1E;"}
|
|
1
|
+
{"version":3,"file":"cache.js","sources":["../../../src/cache/core/cache.ts"],"sourcesContent":["import { WeakCache } from \"@wry/caches\";\nimport type {\n DocumentNode,\n FragmentDefinitionNode,\n InlineFragmentNode,\n} from \"graphql\";\nimport { wrap } from \"optimism\";\nimport { Observable } from \"rxjs\";\n\nimport type {\n GetDataState,\n OperationVariables,\n TypedDocumentNode,\n} from \"@apollo/client\";\nimport type { FragmentType, Unmasked } from \"@apollo/client/masking\";\nimport type { Reference, StoreObject } from \"@apollo/client/utilities\";\nimport { cacheSizes } from \"@apollo/client/utilities\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport type { NoInfer } from \"@apollo/client/utilities/internal\";\nimport {\n equalByQuery,\n getApolloCacheMemoryInternals,\n getFragmentDefinition,\n getFragmentQueryDocument,\n} from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport { defaultCacheSizes } from \"../../utilities/caching/sizes.js\";\n\nimport type { Cache } from \"./types/Cache.js\";\nimport type { MissingTree } from \"./types/common.js\";\n\nexport type Transaction = (c: ApolloCache) => void;\n\nexport declare namespace ApolloCache {\n /**\n * Watched fragment options.\n */\n export interface WatchFragmentOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > {\n /**\n * A GraphQL fragment document parsed into an AST with the `gql`\n * template literal.\n *\n * @docGroup 1. Required options\n */\n fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;\n /**\n * An object containing a `__typename` and primary key fields\n * (such as `id`) identifying the entity object from which the fragment will\n * be retrieved, or a `{ __ref: \"...\" }` reference, or a `string` ID\n * (uncommon).\n *\n * @docGroup 1. Required options\n */\n from: StoreObject | Reference | FragmentType<NoInfer<TData>> | string;\n /**\n * Any variables that the GraphQL fragment may depend on.\n *\n * @docGroup 2. Cache options\n */\n variables?: TVariables;\n /**\n * The name of the fragment defined in the fragment document.\n *\n * Required if the fragment document includes more than one fragment,\n * optional otherwise.\n *\n * @docGroup 2. Cache options\n */\n fragmentName?: string;\n /**\n * If `true`, `watchFragment` returns optimistic results.\n *\n * The default value is `true`.\n *\n * @docGroup 2. Cache options\n */\n optimistic?: boolean;\n }\n\n /**\n * Watched fragment results.\n */\n export type WatchFragmentResult<TData = unknown> =\n | ({\n complete: true;\n missing?: never;\n } & GetDataState<TData, \"complete\">)\n | ({\n complete: false;\n missing: MissingTree;\n } & GetDataState<TData, \"partial\">);\n}\n\nexport abstract class ApolloCache {\n public readonly assumeImmutableResults: boolean = false;\n\n // required to implement\n // core API\n public abstract read<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(query: Cache.ReadOptions<TData, TVariables>): Unmasked<TData> | null;\n public abstract write<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(write: Cache.WriteOptions<TData, TVariables>): Reference | undefined;\n\n /**\n * Returns data read from the cache for a given query along with information\n * about the cache result such as whether the result is complete and details\n * about missing fields.\n *\n * Will return `complete` as `true` if it can fulfill the full cache result or\n * `false` if not. When no data can be fulfilled from the cache, `null` is\n * returned. When `returnPartialData` is `true`, non-null partial results are\n * returned if it contains at least one field that can be fulfilled from the\n * cache.\n */\n public abstract diff<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(query: Cache.DiffOptions<TData, TVariables>): Cache.DiffResult<TData>;\n public abstract watch<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(watch: Cache.WatchOptions<TData, TVariables>): () => void;\n\n // Empty the cache and restart all current watches (unless\n // options.discardWatches is true).\n public abstract reset(options?: Cache.ResetOptions): Promise<void>;\n\n // Remove whole objects from the cache by passing just options.id, or\n // specific fields by passing options.field and/or options.args. If no\n // options.args are provided, all fields matching options.field (even\n // those with arguments) will be removed. Returns true iff any data was\n // removed from the cache.\n public abstract evict(options: Cache.EvictOptions): boolean;\n\n // initializer / offline / ssr API\n /**\n * Replaces existing state in the cache (if any) with the values expressed by\n * `serializedState`.\n *\n * Called when hydrating a cache (server side rendering, or offline storage),\n * and also (potentially) during hot reloads.\n */\n public abstract restore(serializedState: unknown): this;\n\n /**\n * Exposes the cache's complete state, in a serializable format for later restoration.\n */\n public abstract extract(optimistic?: boolean): unknown;\n\n // Optimistic API\n\n public abstract removeOptimistic(id: string): void;\n\n // Used by data masking to determine if an inline fragment with a type\n // condition matches a given typename. Also used by local resolvers to match a\n // fragment against a typename.\n //\n // If not implemented by a cache subclass, data masking will effectively be\n // disabled since we will not be able to accurately determine if a given type\n // condition for a union or interface matches a particular type.\n public abstract fragmentMatches(\n fragment: InlineFragmentNode | FragmentDefinitionNode,\n typename: string\n ): boolean;\n\n // Function used to lookup a fragment when a fragment definition is not part\n // of the GraphQL document. This is useful for caches, such as InMemoryCache,\n // that register fragments ahead of time so they can be referenced by name.\n public lookupFragment(fragmentName: string): FragmentDefinitionNode | null {\n return null;\n }\n\n // Transactional API\n\n // The batch method is intended to replace/subsume both performTransaction\n // and recordOptimisticTransaction, but performTransaction came first, so we\n // provide a default batch implementation that's just another way of calling\n // performTransaction. Subclasses of ApolloCache (such as InMemoryCache) can\n // override the batch method to do more interesting things with its options.\n public batch<U>(options: Cache.BatchOptions<this, U>): U {\n const optimisticId =\n typeof options.optimistic === \"string\" ? options.optimistic\n : options.optimistic === false ? null\n : void 0;\n let updateResult: U;\n this.performTransaction(\n () => (updateResult = options.update(this)),\n optimisticId\n );\n return updateResult!;\n }\n\n public abstract performTransaction(\n transaction: Transaction,\n // Although subclasses may implement recordOptimisticTransaction\n // however they choose, the default implementation simply calls\n // performTransaction with a string as the second argument, allowing\n // performTransaction to handle both optimistic and non-optimistic\n // (broadcast-batching) transactions. Passing null for optimisticId is\n // also allowed, and indicates that performTransaction should apply\n // the transaction non-optimistically (ignoring optimistic data).\n optimisticId?: string | null\n ): void;\n\n public recordOptimisticTransaction(\n transaction: Transaction,\n optimisticId: string\n ) {\n this.performTransaction(transaction, optimisticId);\n }\n\n // Optional API\n\n // Called once per input document, allowing the cache to make static changes\n // to the query, such as adding __typename fields.\n public transformDocument(document: DocumentNode): DocumentNode {\n return document;\n }\n\n // Called before each ApolloLink request, allowing the cache to make dynamic\n // changes to the query, such as filling in missing fragment definitions.\n public transformForLink(document: DocumentNode): DocumentNode {\n return document;\n }\n\n public identify(object: StoreObject | Reference): string | undefined {\n return;\n }\n\n public gc(): string[] {\n return [];\n }\n\n public modify<Entity extends Record<string, any> = Record<string, any>>(\n options: Cache.ModifyOptions<Entity>\n ): boolean {\n return false;\n }\n\n /**\n * Read data from the cache for the specified query.\n */\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n query,\n variables,\n id,\n optimistic,\n returnPartialData,\n }: Cache.ReadQueryOptions<TData, TVariables>): Unmasked<TData> | null;\n /**\n * {@inheritDoc @apollo/client!ApolloCache#readQuery:member(1)}\n */\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadQueryOptions<TData, TVariables>,\n /**\n * @deprecated Pass the `optimistic` argument as part of the first argument\n * instead of passing it as a separate option.\n */\n optimistic: boolean\n ): Unmasked<TData> | null;\n public readQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadQueryOptions<TData, TVariables>,\n optimistic = !!options.optimistic\n ): Unmasked<TData> | null {\n return this.read({\n ...options,\n rootId: options.id || \"ROOT_QUERY\",\n optimistic,\n });\n }\n\n /** {@inheritDoc @apollo/client!ApolloClient#watchFragment:member(1)} */\n public watchFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: ApolloCache.WatchFragmentOptions<TData, TVariables>\n ): Observable<ApolloCache.WatchFragmentResult<Unmasked<TData>>> {\n const {\n fragment,\n fragmentName,\n from,\n optimistic = true,\n ...otherOptions\n } = options;\n const query = this.getFragmentDoc(fragment, fragmentName);\n // While our TypeScript types do not allow for `undefined` as a valid\n // `from`, its possible `useFragment` gives us an `undefined` since it\n // calls` cache.identify` and provides that value to `from`. We are\n // adding this fix here however to ensure those using plain JavaScript\n // and using `cache.identify` themselves will avoid seeing the obscure\n // warning.\n const id =\n typeof from === \"undefined\" || typeof from === \"string\" ?\n from\n : this.identify(from);\n\n if (__DEV__) {\n const actualFragmentName =\n fragmentName || getFragmentDefinition(fragment).name.value;\n\n if (!id) {\n invariant.warn(\n \"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 actualFragmentName\n );\n }\n }\n\n const diffOptions: Cache.DiffOptions<TData, TVariables> = {\n ...otherOptions,\n returnPartialData: true,\n id,\n query,\n optimistic,\n };\n\n let latestDiff: Cache.DiffResult<TData> | undefined;\n\n return new Observable((observer) => {\n return this.watch<TData, TVariables>({\n ...diffOptions,\n immediate: true,\n callback: (diff) => {\n let data = diff.result;\n\n // TODO: Remove this once `watchFragment` supports `null` as valid\n // value emitted\n if (data === null) {\n data = {} as any;\n }\n\n if (\n // Always ensure we deliver the first result\n latestDiff &&\n equalByQuery(\n query,\n { data: latestDiff.result },\n { data },\n options.variables\n )\n ) {\n return;\n }\n\n const result = {\n data,\n dataState: diff.complete ? \"complete\" : \"partial\",\n complete: !!diff.complete,\n } as ApolloCache.WatchFragmentResult<Unmasked<TData>>;\n\n if (diff.missing) {\n result.missing = diff.missing.missing;\n }\n\n latestDiff = { ...diff, result: data } as Cache.DiffResult<TData>;\n observer.next(result);\n },\n });\n });\n }\n\n // Make sure we compute the same (===) fragment query document every\n // time we receive the same fragment in readFragment.\n private getFragmentDoc = wrap(getFragmentQueryDocument, {\n max:\n cacheSizes[\"cache.fragmentQueryDocuments\"] ||\n defaultCacheSizes[\"cache.fragmentQueryDocuments\"],\n cache: WeakCache,\n });\n\n /**\n * Read data from the cache for the specified fragment.\n */\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n fragment,\n variables,\n fragmentName,\n id,\n optimistic,\n returnPartialData,\n }: Cache.ReadFragmentOptions<TData, TVariables>): Unmasked<TData> | null;\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadFragmentOptions<TData, TVariables>,\n /**\n * @deprecated Pass the `optimistic` argument as part of the first argument\n * instead of passing it as a separate option.\n */\n optimistic: boolean\n ): Unmasked<TData> | null;\n public readFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.ReadFragmentOptions<TData, TVariables>,\n optimistic = !!options.optimistic\n ): Unmasked<TData> | null {\n return this.read({\n ...options,\n query: this.getFragmentDoc(options.fragment, options.fragmentName),\n rootId: options.id,\n optimistic,\n });\n }\n\n /**\n * Writes data to the root of the cache using the specified query to validate that\n * the shape of the data you’re writing to the cache is the same as the shape of\n * the data required by the query. Great for prepping the cache with initial data.\n */\n public writeQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n data,\n query,\n variables,\n overwrite,\n id,\n broadcast,\n }: Cache.WriteQueryOptions<TData, TVariables>): Reference | undefined;\n public writeQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n id,\n data,\n ...options\n }: Cache.WriteQueryOptions<TData, TVariables>): Reference | undefined {\n return this.write(\n Object.assign(options, {\n dataId: id || \"ROOT_QUERY\",\n result: data,\n })\n );\n }\n\n /**\n * Similar to `writeQuery` (writes data to the cache) but uses the specified\n * fragment to validate that the shape of the data you’re writing to the cache\n * is the same as the shape of the data required by the fragment.\n */\n public writeFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n // spread in type definitions for discoverability in the docs\n data,\n fragment,\n fragmentName,\n variables,\n overwrite,\n id,\n broadcast,\n }: Cache.WriteFragmentOptions<TData, TVariables>): Reference | undefined;\n public writeFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n id,\n data,\n fragment,\n fragmentName,\n ...options\n }: Cache.WriteFragmentOptions<TData, TVariables>): Reference | undefined {\n return this.write(\n Object.assign(options, {\n query: this.getFragmentDoc(fragment, fragmentName),\n dataId: id,\n result: data,\n })\n );\n }\n\n public updateQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.UpdateQueryOptions<TData, TVariables>,\n update: (data: Unmasked<TData> | null) => Unmasked<TData> | null | void\n ): Unmasked<TData> | null {\n return this.batch({\n update(cache) {\n const value = cache.readQuery<TData, TVariables>(options);\n const data = update(value);\n if (data === void 0 || data === null) return value;\n cache.writeQuery<TData, TVariables>({ ...options, data });\n return data;\n },\n });\n }\n\n public updateFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n options: Cache.UpdateFragmentOptions<TData, TVariables>,\n update: (data: Unmasked<TData> | null) => Unmasked<TData> | null | void\n ): Unmasked<TData> | null {\n return this.batch({\n update(cache) {\n const value = cache.readFragment<TData, TVariables>(options);\n const data = update(value);\n if (data === void 0 || data === null) return value;\n cache.writeFragment<TData, TVariables>({ ...options, data });\n return data;\n },\n });\n }\n\n /**\n * @experimental\n * @internal\n * This is not a stable API - it is used in development builds to expose\n * information to the DevTools.\n * Use at your own risk!\n */\n public declare getMemoryInternals?: typeof getApolloCacheMemoryInternals;\n}\n\nif (__DEV__) {\n ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EAAE,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAA0B,CAA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0E;AAC1E;"}
|
package/core/ApolloClient.js
CHANGED
|
@@ -536,88 +536,6 @@ export class ApolloClient {
|
|
|
536
536
|
this.maskedFragmentTransform.transformDocument(transformed)
|
|
537
537
|
: transformed;
|
|
538
538
|
}
|
|
539
|
-
/**
|
|
540
|
-
* @experimental
|
|
541
|
-
* This is not a stable API - it is used in development builds to expose
|
|
542
|
-
* information to the DevTools.
|
|
543
|
-
* Use at your own risk!
|
|
544
|
-
* For more details, see [Memory Management](https://www.apollographql.com/docs/react/caching/memory-management/#measuring-cache-usage)
|
|
545
|
-
*
|
|
546
|
-
* @example
|
|
547
|
-
*
|
|
548
|
-
* ```ts
|
|
549
|
-
* console.log(client.getMemoryInternals());
|
|
550
|
-
* ```
|
|
551
|
-
*
|
|
552
|
-
* Logs output in the following JSON format:
|
|
553
|
-
* @example
|
|
554
|
-
*
|
|
555
|
-
* ```json
|
|
556
|
-
* {
|
|
557
|
-
* "limits": {
|
|
558
|
-
* "canonicalStringify": 1000,
|
|
559
|
-
* "print": 2000,
|
|
560
|
-
* "documentTransform.cache": 2000,
|
|
561
|
-
* "queryManager.getDocumentInfo": 2000,
|
|
562
|
-
* "PersistedQueryLink.persistedQueryHashes": 2000,
|
|
563
|
-
* "fragmentRegistry.transform": 2000,
|
|
564
|
-
* "fragmentRegistry.lookup": 1000,
|
|
565
|
-
* "fragmentRegistry.findFragmentSpreads": 4000,
|
|
566
|
-
* "cache.fragmentQueryDocuments": 1000,
|
|
567
|
-
* "removeTypenameFromVariables.getVariableDefinitions": 2000,
|
|
568
|
-
* "inMemoryCache.maybeBroadcastWatch": 5000,
|
|
569
|
-
* "inMemoryCache.executeSelectionSet": 10000,
|
|
570
|
-
* "inMemoryCache.executeSubSelectedArray": 5000
|
|
571
|
-
* },
|
|
572
|
-
* "sizes": {
|
|
573
|
-
* "canonicalStringify": 4,
|
|
574
|
-
* "print": 14,
|
|
575
|
-
* "addTypenameDocumentTransform": [
|
|
576
|
-
* {
|
|
577
|
-
* "cache": 14
|
|
578
|
-
* }
|
|
579
|
-
* ],
|
|
580
|
-
* "queryManager": {
|
|
581
|
-
* "getDocumentInfo": 14,
|
|
582
|
-
* "documentTransforms": [
|
|
583
|
-
* {
|
|
584
|
-
* "cache": 14
|
|
585
|
-
* },
|
|
586
|
-
* {
|
|
587
|
-
* "cache": 14
|
|
588
|
-
* }
|
|
589
|
-
* ]
|
|
590
|
-
* },
|
|
591
|
-
* "fragmentRegistry": {
|
|
592
|
-
* "findFragmentSpreads": 34,
|
|
593
|
-
* "lookup": 20,
|
|
594
|
-
* "transform": 14
|
|
595
|
-
* },
|
|
596
|
-
* "cache": {
|
|
597
|
-
* "fragmentQueryDocuments": 22
|
|
598
|
-
* },
|
|
599
|
-
* "inMemoryCache": {
|
|
600
|
-
* "executeSelectionSet": 4345,
|
|
601
|
-
* "executeSubSelectedArray": 1206,
|
|
602
|
-
* "maybeBroadcastWatch": 32
|
|
603
|
-
* },
|
|
604
|
-
* "links": [
|
|
605
|
-
* {
|
|
606
|
-
* "PersistedQueryLink": {
|
|
607
|
-
* "persistedQueryHashes": 14
|
|
608
|
-
* }
|
|
609
|
-
* },
|
|
610
|
-
* {
|
|
611
|
-
* "removeTypenameFromVariables": {
|
|
612
|
-
* "getVariableDefinitions": 14
|
|
613
|
-
* }
|
|
614
|
-
* }
|
|
615
|
-
* ]
|
|
616
|
-
* }
|
|
617
|
-
* }
|
|
618
|
-
* ```
|
|
619
|
-
*/
|
|
620
|
-
getMemoryInternals;
|
|
621
539
|
}
|
|
622
540
|
if (__DEV__) {
|
|
623
541
|
ApolloClient.prototype.getMemoryInternals = getApolloClientMemoryInternals;
|