diff --git a/packages/apollo-angular/headers/src/index.ts b/packages/apollo-angular/headers/src/index.ts index f2ed5f233..a15a9e537 100644 --- a/packages/apollo-angular/headers/src/index.ts +++ b/packages/apollo-angular/headers/src/index.ts @@ -1,5 +1,5 @@ import { HttpHeaders } from '@angular/common/http'; -import { ApolloLink, NextLink, Operation } from '@apollo/client/core'; +import { ApolloLink, NextLink, Operation } from '@apollo/client/core/index.js'; export const httpHeaders = () => { return new ApolloLink((operation: Operation, forward: NextLink) => { diff --git a/packages/apollo-angular/headers/tests/index.spec.ts b/packages/apollo-angular/headers/tests/index.spec.ts index 18adeaa0e..51602410c 100644 --- a/packages/apollo-angular/headers/tests/index.spec.ts +++ b/packages/apollo-angular/headers/tests/index.spec.ts @@ -1,5 +1,10 @@ import { HttpHeaders } from '@angular/common/http'; -import { ApolloLink, execute, gql, Observable as LinkObservable } from '@apollo/client/core'; +import { + ApolloLink, + execute, + gql, + Observable as LinkObservable, +} from '@apollo/client/core/index.js'; import { httpHeaders } from '../src'; const query = gql` diff --git a/packages/apollo-angular/http/src/http-batch-link.ts b/packages/apollo-angular/http/src/http-batch-link.ts index b18aca58c..177e107d4 100644 --- a/packages/apollo-angular/http/src/http-batch-link.ts +++ b/packages/apollo-angular/http/src/http-batch-link.ts @@ -6,7 +6,7 @@ import { FetchResult, Observable as LinkObservable, Operation, -} from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; import { BatchHandler, BatchLink } from '@apollo/client/link/batch'; import { BatchOptions, Body, Context, OperationPrinter, Options, Request } from './types'; import { createHeadersWithClientAwareness, fetch, mergeHeaders, prioritize } from './utils'; diff --git a/packages/apollo-angular/http/src/http-link.ts b/packages/apollo-angular/http/src/http-link.ts index 7d40d281f..f9783f288 100644 --- a/packages/apollo-angular/http/src/http-link.ts +++ b/packages/apollo-angular/http/src/http-link.ts @@ -6,7 +6,7 @@ import { FetchResult, Observable as LinkObservable, Operation, -} from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; import { pick } from './http-batch-link'; import { Body, Context, OperationPrinter, Options, Request } from './types'; import { createHeadersWithClientAwareness, fetch, mergeHeaders } from './utils'; diff --git a/packages/apollo-angular/http/src/types.ts b/packages/apollo-angular/http/src/types.ts index 58ddf3612..1bdced7dd 100644 --- a/packages/apollo-angular/http/src/types.ts +++ b/packages/apollo-angular/http/src/types.ts @@ -1,6 +1,6 @@ import { DocumentNode } from 'graphql'; import { HttpHeaders } from '@angular/common/http'; -import { Operation } from '@apollo/client/core'; +import { Operation } from '@apollo/client/core/index.js'; export type HttpRequestOptions = { headers?: HttpHeaders; diff --git a/packages/apollo-angular/http/tests/http-batch-link.spec.ts b/packages/apollo-angular/http/tests/http-batch-link.spec.ts index 4c7718138..92a1b6f20 100644 --- a/packages/apollo-angular/http/tests/http-batch-link.spec.ts +++ b/packages/apollo-angular/http/tests/http-batch-link.spec.ts @@ -1,7 +1,7 @@ import { HttpClientModule, HttpHeaders } from '@angular/common/http'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; -import { ApolloLink, execute, gql, Operation } from '@apollo/client/core'; +import { ApolloLink, execute, gql, Operation } from '@apollo/client/core/index.js'; import { HttpBatchLink } from '../src/http-batch-link'; const noop = () => { diff --git a/packages/apollo-angular/http/tests/http-link.spec.ts b/packages/apollo-angular/http/tests/http-link.spec.ts index 1b79981ad..249bf772c 100644 --- a/packages/apollo-angular/http/tests/http-link.spec.ts +++ b/packages/apollo-angular/http/tests/http-link.spec.ts @@ -3,7 +3,7 @@ import { mergeMap } from 'rxjs/operators'; import { HttpClientModule, HttpHeaders } from '@angular/common/http'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; -import { ApolloLink, execute, gql, InMemoryCache } from '@apollo/client/core'; +import { ApolloLink, execute, gql, InMemoryCache } from '@apollo/client/core/index.js'; import { Apollo } from '../../src'; import { HttpLink } from '../src/http-link'; diff --git a/packages/apollo-angular/http/tests/ssr.spec.ts b/packages/apollo-angular/http/tests/ssr.spec.ts index 3264bbdea..6c06b638f 100644 --- a/packages/apollo-angular/http/tests/ssr.spec.ts +++ b/packages/apollo-angular/http/tests/ssr.spec.ts @@ -9,7 +9,7 @@ import { renderModule, ServerModule, } from '@angular/platform-server'; -import { execute, gql } from '@apollo/client/core'; +import { execute, gql } from '@apollo/client/core/index.js'; import { HttpLink } from '../src/http-link'; describe.skip('integration', () => { diff --git a/packages/apollo-angular/persisted-queries/tests/persisted-queries.spec.ts b/packages/apollo-angular/persisted-queries/tests/persisted-queries.spec.ts index bbf7e6cf0..c7e5f9f01 100644 --- a/packages/apollo-angular/persisted-queries/tests/persisted-queries.spec.ts +++ b/packages/apollo-angular/persisted-queries/tests/persisted-queries.spec.ts @@ -1,4 +1,11 @@ -import { ApolloLink, execute, FetchResult, gql, Observable, Operation } from '@apollo/client/core'; +import { + ApolloLink, + execute, + FetchResult, + gql, + Observable, + Operation, +} from '@apollo/client/core/index.js'; import { createPersistedQueryLink } from '../src'; const query = gql` diff --git a/packages/apollo-angular/schematics/install/files/module/graphql.module.ts b/packages/apollo-angular/schematics/install/files/module/graphql.module.ts index 2ef4d4fcd..8a8da7011 100644 --- a/packages/apollo-angular/schematics/install/files/module/graphql.module.ts +++ b/packages/apollo-angular/schematics/install/files/module/graphql.module.ts @@ -1,7 +1,7 @@ import { APOLLO_OPTIONS, ApolloModule } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { NgModule } from '@angular/core'; -import { ApolloClientOptions, InMemoryCache } from '@apollo/client/core'; +import { ApolloClientOptions, InMemoryCache } from '@apollo/client/core/index.js'; const uri = '<%= endpoint %>'; // <-- add the URL of the GraphQL server here export function createApollo(httpLink: HttpLink): ApolloClientOptions { diff --git a/packages/apollo-angular/schematics/install/index.ts b/packages/apollo-angular/schematics/install/index.ts index 589da158f..053501ad2 100644 --- a/packages/apollo-angular/schematics/install/index.ts +++ b/packages/apollo-angular/schematics/install/index.ts @@ -98,7 +98,7 @@ function includeAsyncIterableLib(): Rule { '\n' + tags.stripIndent` We couldn't find '${requiredLib}' in the list of library files to be included in the compilation. - It's required by '@apollo/client/core' package so please add it to your tsconfig. + It's required by '@apollo/client/core/index.js' package so please add it to your tsconfig. ` + '\n', ); @@ -151,7 +151,7 @@ function allowSyntheticDefaultImports(): Rule { '\n' + tags.stripIndent` We couldn't enable 'allowSyntheticDefaultImports' flag. - It's required by '@apollo/client/core' package so please add it to your tsconfig. + It's required by '@apollo/client/core/index.js' package so please add it to your tsconfig. ` + '\n', ); @@ -201,7 +201,7 @@ function importSetup(options: Schema): Rule { link: httpLink.create({ uri: '<%= endpoint %>', }), - cache: new ${external('InMemoryCache', '@apollo/client/core')}(), + cache: new ${external('InMemoryCache', '@apollo/client/core/index.js')}(), }; })`; }); diff --git a/packages/apollo-angular/src/apollo-module.ts b/packages/apollo-angular/src/apollo-module.ts index 7a59bbc5f..40513007b 100644 --- a/packages/apollo-angular/src/apollo-module.ts +++ b/packages/apollo-angular/src/apollo-module.ts @@ -1,5 +1,5 @@ import { NgModule, Provider } from '@angular/core'; -import { ApolloClientOptions } from '@apollo/client/core'; +import { ApolloClientOptions } from '@apollo/client/core/index.js'; import { Apollo } from './apollo'; import { APOLLO_FLAGS, APOLLO_NAMED_OPTIONS, APOLLO_OPTIONS } from './tokens'; import { Flags, NamedOptions } from './types'; diff --git a/packages/apollo-angular/src/apollo.ts b/packages/apollo-angular/src/apollo.ts index 63b23bcac..d9c98d530 100644 --- a/packages/apollo-angular/src/apollo.ts +++ b/packages/apollo-angular/src/apollo.ts @@ -9,8 +9,8 @@ import type { QueryOptions, SubscriptionOptions, WatchFragmentResult, -} from '@apollo/client/core'; -import { ApolloClient } from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; +import { ApolloClient } from '@apollo/client/core/index.js'; import { QueryRef } from './query-ref'; import { APOLLO_FLAGS, APOLLO_NAMED_OPTIONS, APOLLO_OPTIONS } from './tokens'; import type { diff --git a/packages/apollo-angular/src/gql.ts b/packages/apollo-angular/src/gql.ts index 8a318531c..cf23d5227 100644 --- a/packages/apollo-angular/src/gql.ts +++ b/packages/apollo-angular/src/gql.ts @@ -1,4 +1,4 @@ -import { gql as gqlTag, TypedDocumentNode } from '@apollo/client/core'; +import { gql as gqlTag, TypedDocumentNode } from '@apollo/client/core/index.js'; function typedGQLTag( literals: ReadonlyArray | Readonly, diff --git a/packages/apollo-angular/src/index.ts b/packages/apollo-angular/src/index.ts index f93645581..e140cd091 100644 --- a/packages/apollo-angular/src/index.ts +++ b/packages/apollo-angular/src/index.ts @@ -1,4 +1,4 @@ -export type { TypedDocumentNode } from '@apollo/client/core'; +export type { TypedDocumentNode } from '@apollo/client/core/index.js'; export { ApolloModule, provideApollo, provideNamedApollo } from './apollo-module'; export { Apollo, ApolloBase } from './apollo'; export { QueryRef, QueryRefFromDocument } from './query-ref'; diff --git a/packages/apollo-angular/src/mutation.ts b/packages/apollo-angular/src/mutation.ts index 7d706ece6..e4bf90ba4 100644 --- a/packages/apollo-angular/src/mutation.ts +++ b/packages/apollo-angular/src/mutation.ts @@ -1,7 +1,7 @@ import type { DocumentNode } from 'graphql'; import type { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; -import type { OperationVariables, TypedDocumentNode } from '@apollo/client/core'; +import type { OperationVariables, TypedDocumentNode } from '@apollo/client/core/index.js'; import { Apollo } from './apollo'; import type { EmptyObject, MutationOptionsAlone, MutationResult } from './types'; diff --git a/packages/apollo-angular/src/query-ref.ts b/packages/apollo-angular/src/query-ref.ts index 4dce2a3de..e4dbb285c 100644 --- a/packages/apollo-angular/src/query-ref.ts +++ b/packages/apollo-angular/src/query-ref.ts @@ -9,8 +9,8 @@ import type { SubscribeToMoreOptions, TypedDocumentNode, UpdateQueryOptions, -} from '@apollo/client/core'; -import { NetworkStatus } from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; +import { NetworkStatus } from '@apollo/client/core/index.js'; import { EmptyObject, WatchQueryOptions } from './types'; import { fixObservable, wrapWithZone } from './utils'; diff --git a/packages/apollo-angular/src/query.ts b/packages/apollo-angular/src/query.ts index 00b2a5d82..84bdc490d 100644 --- a/packages/apollo-angular/src/query.ts +++ b/packages/apollo-angular/src/query.ts @@ -1,7 +1,11 @@ import type { DocumentNode } from 'graphql'; import type { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; -import type { ApolloQueryResult, OperationVariables, TypedDocumentNode } from '@apollo/client/core'; +import type { + ApolloQueryResult, + OperationVariables, + TypedDocumentNode, +} from '@apollo/client/core/index.js'; import { Apollo } from './apollo'; import { QueryRef } from './query-ref'; import { EmptyObject, QueryOptionsAlone, WatchQueryOptionsAlone } from './types'; diff --git a/packages/apollo-angular/src/subscription.ts b/packages/apollo-angular/src/subscription.ts index 290fd29ca..c5e524333 100644 --- a/packages/apollo-angular/src/subscription.ts +++ b/packages/apollo-angular/src/subscription.ts @@ -1,7 +1,7 @@ import type { DocumentNode } from 'graphql'; import type { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; -import type { OperationVariables, TypedDocumentNode } from '@apollo/client/core'; +import type { OperationVariables, TypedDocumentNode } from '@apollo/client/core/index.js'; import { Apollo } from './apollo'; import { EmptyObject, diff --git a/packages/apollo-angular/src/tokens.ts b/packages/apollo-angular/src/tokens.ts index b4bfcd303..437b5cfb9 100644 --- a/packages/apollo-angular/src/tokens.ts +++ b/packages/apollo-angular/src/tokens.ts @@ -1,5 +1,5 @@ import { InjectionToken } from '@angular/core'; -import type { ApolloClientOptions } from '@apollo/client/core'; +import type { ApolloClientOptions } from '@apollo/client/core/index.js'; import type { Flags, NamedOptions } from './types'; export const APOLLO_FLAGS = new InjectionToken('APOLLO_FLAGS'); diff --git a/packages/apollo-angular/src/types.ts b/packages/apollo-angular/src/types.ts index 7206b4c63..3e874d955 100644 --- a/packages/apollo-angular/src/types.ts +++ b/packages/apollo-angular/src/types.ts @@ -9,7 +9,7 @@ import type { FetchResult, OperationVariables, TypedDocumentNode, -} from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; export type EmptyObject = { [key: string]: any; diff --git a/packages/apollo-angular/src/utils.ts b/packages/apollo-angular/src/utils.ts index 02f21136e..32df8b47e 100644 --- a/packages/apollo-angular/src/utils.ts +++ b/packages/apollo-angular/src/utils.ts @@ -7,7 +7,7 @@ import type { ApolloQueryResult, FetchResult, ObservableQuery, -} from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; import { MutationResult } from './types'; export function fromPromise(promiseFn: () => Promise): Observable { diff --git a/packages/apollo-angular/testing/src/backend.ts b/packages/apollo-angular/testing/src/backend.ts index 6f0febc3c..d0a38b84a 100644 --- a/packages/apollo-angular/testing/src/backend.ts +++ b/packages/apollo-angular/testing/src/backend.ts @@ -1,7 +1,7 @@ import { DocumentNode, print } from 'graphql'; import { Observer } from 'rxjs'; import { Injectable } from '@angular/core'; -import { FetchResult, Observable as LinkObservable } from '@apollo/client/core'; +import { FetchResult, Observable as LinkObservable } from '@apollo/client/core/index.js'; import { ApolloTestingController, MatchOperation } from './controller'; import { Operation, TestOperation } from './operation'; diff --git a/packages/apollo-angular/testing/src/module.ts b/packages/apollo-angular/testing/src/module.ts index 802c4f36c..bfae3cc9c 100644 --- a/packages/apollo-angular/testing/src/module.ts +++ b/packages/apollo-angular/testing/src/module.ts @@ -5,7 +5,7 @@ import { ApolloLink, InMemoryCache, Operation as LinkOperation, -} from '@apollo/client/core'; +} from '@apollo/client/core/index.js'; import { ApolloTestingBackend } from './backend'; import { ApolloTestingController } from './controller'; import { Operation } from './operation'; diff --git a/packages/apollo-angular/testing/src/operation.ts b/packages/apollo-angular/testing/src/operation.ts index b64dca764..ef2355214 100644 --- a/packages/apollo-angular/testing/src/operation.ts +++ b/packages/apollo-angular/testing/src/operation.ts @@ -1,6 +1,6 @@ import { ExecutionResult, GraphQLError } from 'graphql'; import { Observer } from 'rxjs'; -import { ApolloError, FetchResult, Operation as LinkOperation } from '@apollo/client/core'; +import { ApolloError, FetchResult, Operation as LinkOperation } from '@apollo/client/core/index.js'; const isApolloError = (err: any): err is ApolloError => err && err.hasOwnProperty('graphQLErrors'); diff --git a/packages/apollo-angular/testing/tests/integration.spec.ts b/packages/apollo-angular/testing/tests/integration.spec.ts index f0d42c4d1..6f899b347 100644 --- a/packages/apollo-angular/testing/tests/integration.spec.ts +++ b/packages/apollo-angular/testing/tests/integration.spec.ts @@ -1,7 +1,7 @@ import { Apollo } from 'apollo-angular'; import { print } from 'graphql'; import { TestBed } from '@angular/core/testing'; -import { gql, InMemoryCache } from '@apollo/client/core'; +import { gql, InMemoryCache } from '@apollo/client/core/index.js'; import { addTypenameToDocument } from '@apollo/client/utilities'; import { APOLLO_TESTING_CACHE, ApolloTestingController, ApolloTestingModule } from '../src'; diff --git a/packages/apollo-angular/testing/tests/module.spec.ts b/packages/apollo-angular/testing/tests/module.spec.ts index f0f2ec2b0..9ef2dbd51 100644 --- a/packages/apollo-angular/testing/tests/module.spec.ts +++ b/packages/apollo-angular/testing/tests/module.spec.ts @@ -1,6 +1,6 @@ import { Apollo } from 'apollo-angular'; import { TestBed } from '@angular/core/testing'; -import { ApolloReducerConfig, gql, InMemoryCache } from '@apollo/client/core'; +import { ApolloReducerConfig, gql, InMemoryCache } from '@apollo/client/core/index.js'; import { APOLLO_TESTING_CACHE, ApolloTestingController, ApolloTestingModule } from '../src'; describe('ApolloTestingModule', () => { diff --git a/packages/apollo-angular/testing/tests/operation.spec.ts b/packages/apollo-angular/testing/tests/operation.spec.ts index 2e098efb5..40f445b47 100644 --- a/packages/apollo-angular/testing/tests/operation.spec.ts +++ b/packages/apollo-angular/testing/tests/operation.spec.ts @@ -1,4 +1,4 @@ -import { ApolloLink, execute, gql } from '@apollo/client/core'; +import { ApolloLink, execute, gql } from '@apollo/client/core/index.js'; import { ApolloTestingBackend } from '../src/backend'; import { buildOperationForLink } from './utils'; diff --git a/packages/apollo-angular/tests/Apollo.spec.ts b/packages/apollo-angular/tests/Apollo.spec.ts index 24517d07f..c684b6a28 100644 --- a/packages/apollo-angular/tests/Apollo.spec.ts +++ b/packages/apollo-angular/tests/Apollo.spec.ts @@ -2,7 +2,7 @@ import { Observable, of } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; import { NgZone } from '@angular/core'; import { TestBed } from '@angular/core/testing'; -import { ApolloLink, InMemoryCache, NetworkStatus } from '@apollo/client/core'; +import { ApolloLink, InMemoryCache, NetworkStatus } from '@apollo/client/core/index.js'; import { mockSingleLink } from '@apollo/client/testing'; import { Apollo, ApolloBase } from '../src/apollo'; import { gql } from '../src/gql'; diff --git a/packages/apollo-angular/tests/QueryRef.spec.ts b/packages/apollo-angular/tests/QueryRef.spec.ts index 8bbf4c65b..24779d9b0 100644 --- a/packages/apollo-angular/tests/QueryRef.spec.ts +++ b/packages/apollo-angular/tests/QueryRef.spec.ts @@ -1,7 +1,12 @@ import { Subject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; import { NgZone } from '@angular/core'; -import { ApolloClient, ApolloLink, InMemoryCache, ObservableQuery } from '@apollo/client/core'; +import { + ApolloClient, + ApolloLink, + InMemoryCache, + ObservableQuery, +} from '@apollo/client/core/index.js'; import { mockSingleLink } from '@apollo/client/testing'; import { gql } from '../src/gql'; import { QueryRef } from '../src/query-ref'; diff --git a/packages/apollo-angular/tests/integration.spec.ts b/packages/apollo-angular/tests/integration.spec.ts index a73b060f7..0a961edd5 100644 --- a/packages/apollo-angular/tests/integration.spec.ts +++ b/packages/apollo-angular/tests/integration.spec.ts @@ -1,6 +1,6 @@ import { HttpClientModule } from '@angular/common/http'; import { TestBed } from '@angular/core/testing'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; import { mockSingleLink } from '@apollo/client/testing'; import { Apollo, provideApollo } from '../src'; diff --git a/packages/demo/src/app/app.config.ts b/packages/demo/src/app/app.config.ts index fd1569cce..ab03214f5 100644 --- a/packages/demo/src/app/app.config.ts +++ b/packages/demo/src/app/app.config.ts @@ -3,7 +3,7 @@ import { HttpLink } from 'apollo-angular/http'; import { provideHttpClient } from '@angular/common/http'; import { ApplicationConfig, inject, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { diff --git a/website/src/pages/docs/caching/advanced-topics.mdx b/website/src/pages/docs/caching/advanced-topics.mdx index 41dc021e5..0276c486d 100644 --- a/website/src/pages/docs/caching/advanced-topics.mdx +++ b/website/src/pages/docs/caching/advanced-topics.mdx @@ -314,7 +314,7 @@ a different query, Apollo Client doesn't know that. To tell Apollo Client where existing `book` data, we can define a field policy `read` function for the `book` field: ```ts -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; const cache = new InMemoryCache({ typePolicies: { @@ -383,7 +383,7 @@ write to the cache with a short configurable debounce interval. ```ts import { LocalStorageWrapper, persistCacheSync } from 'apollo3-cache-persist'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; const cache = new InMemoryCache(); diff --git a/website/src/pages/docs/caching/configuration.mdx b/website/src/pages/docs/caching/configuration.mdx index 1dcb2a3b6..d3d06985d 100644 --- a/website/src/pages/docs/caching/configuration.mdx +++ b/website/src/pages/docs/caching/configuration.mdx @@ -28,7 +28,7 @@ Create an `InMemoryCache` object and provide to Apollo options, like so: import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -168,7 +168,7 @@ If you need to define a single fallback `keyFields` function that isn't specific `__typename`, you can use the `dataIdFromObject` function that was introduced in Apollo Client 2.x: ```ts -import { defaultDataIdFromObject } from '@apollo/client/core'; +import { defaultDataIdFromObject } from '@apollo/client/core/index.js'; const cache = new InMemoryCache({ dataIdFromObject(responseObject) { diff --git a/website/src/pages/docs/data/mutations.mdx b/website/src/pages/docs/data/mutations.mdx index 1a37c5e72..1fd98c384 100644 --- a/website/src/pages/docs/data/mutations.mdx +++ b/website/src/pages/docs/data/mutations.mdx @@ -258,7 +258,7 @@ can enable `useMutationLoading` flag in configuration. import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo( () => { diff --git a/website/src/pages/docs/data/network.mdx b/website/src/pages/docs/data/network.mdx index 4afcf37f1..8638c9d69 100644 --- a/website/src/pages/docs/data/network.mdx +++ b/website/src/pages/docs/data/network.mdx @@ -24,7 +24,7 @@ easier testing. import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -96,7 +96,7 @@ apollo.query({ import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -128,7 +128,7 @@ import { HttpLink } from 'apollo-angular/http'; import extractFiles from 'extract-files/extractFiles.mjs'; import isExtractableFile from 'extract-files/isExtractableFile.mjs'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -162,7 +162,7 @@ import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { HttpHeaders } from '@angular/common/http'; import { inject } from '@angular/core'; -import { ApolloLink, InMemoryCache } from '@apollo/client/core'; +import { ApolloLink, InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -194,7 +194,7 @@ provideApollo(() => { import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; import { onError } from '@apollo/client/link/error'; provideApollo(() => { @@ -226,7 +226,7 @@ An Apollo Link to combine multiple GraphQL operations into single HTTP request. import { provideApollo } from 'apollo-angular'; import { HttpBatchLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpBatchLink = inject(HttpBatchLink); diff --git a/website/src/pages/docs/data/pagination.mdx b/website/src/pages/docs/data/pagination.mdx index 176e0b7f5..6d07127de 100644 --- a/website/src/pages/docs/data/pagination.mdx +++ b/website/src/pages/docs/data/pagination.mdx @@ -34,7 +34,7 @@ field policy for every relevant list field. This example uses `offsetLimitPagination` to generate a field policy for `Query.posts`: ```typescript -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; import { offsetLimitPagination } from '@apollo/client/utilities'; const cache = new InMemoryCache({ @@ -197,7 +197,7 @@ class FeedComponent { ``` ```ts -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; const cache = new InMemoryCache({ typePolicies: { diff --git a/website/src/pages/docs/data/queries.mdx b/website/src/pages/docs/data/queries.mdx index ae7c044fd..184f58fb4 100644 --- a/website/src/pages/docs/data/queries.mdx +++ b/website/src/pages/docs/data/queries.mdx @@ -377,7 +377,7 @@ chain. In order to correct it you can enable `useInitialLoading` flag in configu import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo( () => { diff --git a/website/src/pages/docs/data/subscriptions.mdx b/website/src/pages/docs/data/subscriptions.mdx index b2204c894..9f9311484 100644 --- a/website/src/pages/docs/data/subscriptions.mdx +++ b/website/src/pages/docs/data/subscriptions.mdx @@ -105,7 +105,7 @@ import { HttpLink } from 'apollo-angular/http'; import { Kind, OperationTypeNode } from 'graphql'; import { createClient } from 'graphql-ws'; import { inject } from '@angular/core'; -import { InMemoryCache, split } from '@apollo/client/core'; +import { InMemoryCache, split } from '@apollo/client/core/index.js'; import { GraphQLWsLink } from '@apollo/client/link/subscriptions'; import { getMainDefinition } from '@apollo/client/utilities'; diff --git a/website/src/pages/docs/development-and-testing/client-schema-mocking.mdx b/website/src/pages/docs/development-and-testing/client-schema-mocking.mdx index b43290ca3..9a891eeb4 100644 --- a/website/src/pages/docs/development-and-testing/client-schema-mocking.mdx +++ b/website/src/pages/docs/development-and-testing/client-schema-mocking.mdx @@ -30,7 +30,7 @@ data: import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; const typeDefs = gql` extend type Rocket { diff --git a/website/src/pages/docs/get-started.mdx b/website/src/pages/docs/get-started.mdx index 4913e2ccb..69b6baba2 100644 --- a/website/src/pages/docs/get-started.mdx +++ b/website/src/pages/docs/get-started.mdx @@ -54,7 +54,7 @@ import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { provideHttpClient } from '@angular/common/http'; import { ApplicationConfig, inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; export const appConfig: ApplicationConfig = { providers: [ diff --git a/website/src/pages/docs/performance/server-side-rendering.mdx b/website/src/pages/docs/performance/server-side-rendering.mdx index 8a75a494b..aa77ef179 100644 --- a/website/src/pages/docs/performance/server-side-rendering.mdx +++ b/website/src/pages/docs/performance/server-side-rendering.mdx @@ -28,7 +28,7 @@ import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { provideHttpClient } from '@angular/common/http'; import { ApplicationConfig, inject, InjectionToken } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; const MY_APOLLO_CACHE = new InjectionToken('apollo-cache'); @@ -84,7 +84,7 @@ import { makeStateKey, TransferState, } from '@angular/core'; -import { InMemoryCache, NormalizedCacheObject } from '@apollo/client/core'; +import { InMemoryCache, NormalizedCacheObject } from '@apollo/client/core/index.js'; const MY_APOLLO_CACHE = new InjectionToken('apollo-cache'); const STATE_KEY = makeStateKey('apollo.state'); diff --git a/website/src/pages/docs/recipes/authentication.mdx b/website/src/pages/docs/recipes/authentication.mdx index 3ca48b72b..3bc9a1d45 100644 --- a/website/src/pages/docs/recipes/authentication.mdx +++ b/website/src/pages/docs/recipes/authentication.mdx @@ -24,7 +24,7 @@ backend, it is very easy to tell your network interface to send the cookie along import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); @@ -60,7 +60,7 @@ pull the login token from `localStorage` every time a request is sent. import { provideApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { ApolloLink, InMemoryCache } from '@apollo/client/core'; +import { ApolloLink, InMemoryCache } from '@apollo/client/core/index.js'; import { setContext } from '@apollo/client/link/context'; provideApollo(() => { diff --git a/website/src/pages/docs/recipes/automatic-persisted-queries.mdx b/website/src/pages/docs/recipes/automatic-persisted-queries.mdx index 7dcea5c8e..0ddd5e794 100644 --- a/website/src/pages/docs/recipes/automatic-persisted-queries.mdx +++ b/website/src/pages/docs/recipes/automatic-persisted-queries.mdx @@ -58,7 +58,7 @@ import { HttpLink } from 'apollo-angular/http'; import { createPersistedQueryLink } from 'apollo-angular/persisted-queries'; import { sha256 } from 'crypto-hash'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideApollo(() => { const httpLink = inject(HttpLink); diff --git a/website/src/pages/docs/recipes/multiple-clients.mdx b/website/src/pages/docs/recipes/multiple-clients.mdx index e7a98c890..ddadf22c8 100644 --- a/website/src/pages/docs/recipes/multiple-clients.mdx +++ b/website/src/pages/docs/recipes/multiple-clients.mdx @@ -58,7 +58,7 @@ In our `app.config.ts` file use `provideNamedApollo()` token to configure Apollo import { provideNamedApollo } from 'apollo-angular'; import { HttpLink } from 'apollo-angular/http'; import { inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; provideNamedApollo(() => { const httpLink = inject(HttpLink); diff --git a/website/src/pages/docs/recipes/nativescript.mdx b/website/src/pages/docs/recipes/nativescript.mdx index b77d651ce..24a65b871 100644 --- a/website/src/pages/docs/recipes/nativescript.mdx +++ b/website/src/pages/docs/recipes/nativescript.mdx @@ -27,7 +27,7 @@ import { HttpLink } from 'apollo-angular/http'; import { NativeScriptHttpClientModule } from 'nativescript-angular/http-client'; import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; import { ApplicationConfig, importProvidersFrom, inject } from '@angular/core'; -import { InMemoryCache } from '@apollo/client/core'; +import { InMemoryCache } from '@apollo/client/core/index.js'; export const appConfig: ApplicationConfig = { providers: [