diff --git a/packages/core/src/api/graphql/client.ts b/packages/core/src/api/graphql/client.ts index dda8406..d4ef738 100644 --- a/packages/core/src/api/graphql/client.ts +++ b/packages/core/src/api/graphql/client.ts @@ -1,5 +1,5 @@ +import { ApolloClient, ApolloLink } from '@apollo/client/core/index.js' import type { ApolloClientOptions, Operation } from '@apollo/client/core' -import { ApolloClient, ApolloLink } from '@apollo/client/core' import { debugging } from '../../configuration' import { @@ -50,10 +50,10 @@ export class QuilttClient extends ApolloClient { */ /** Client and Tooling */ -export { gql } from '@apollo/client/core' -export { InMemoryCache } from '@apollo/client/cache' +export { gql } from '@apollo/client/core/index.js' +export { InMemoryCache } from '@apollo/client/cache/index.js' export type { ApolloError, OperationVariables } from '@apollo/client/core' export type { NormalizedCacheObject } from '@apollo/client/cache' /** React hooks used by @quiltt/react-native and @quiltt/react */ -export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks' +export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks/index.js' diff --git a/packages/core/src/api/graphql/links/ActionCableLink.ts b/packages/core/src/api/graphql/links/ActionCableLink.ts index 3f64a0d..64cd10d 100644 --- a/packages/core/src/api/graphql/links/ActionCableLink.ts +++ b/packages/core/src/api/graphql/links/ActionCableLink.ts @@ -1,5 +1,5 @@ -import { ApolloLink } from '@apollo/client/core' -import { Observable } from '@apollo/client/utilities' +import { ApolloLink } from '@apollo/client/core/index.js' +import { Observable } from '@apollo/client/utilities/index.js' import type { FetchResult, NextLink, Operation } from '@apollo/client/core' import { createConsumer } from '@rails/actioncable' diff --git a/packages/core/src/api/graphql/links/AuthLink.ts b/packages/core/src/api/graphql/links/AuthLink.ts index a3217a5..9f3ffc8 100644 --- a/packages/core/src/api/graphql/links/AuthLink.ts +++ b/packages/core/src/api/graphql/links/AuthLink.ts @@ -1,4 +1,4 @@ -import { ApolloLink } from '@apollo/client/core' +import { ApolloLink } from '@apollo/client/core/index.js' import type { FetchResult, NextLink, Operation } from '@apollo/client/core' import type { Observable } from '@apollo/client/utilities' diff --git a/packages/core/src/api/graphql/links/BatchHttpLink.ts b/packages/core/src/api/graphql/links/BatchHttpLink.ts index 02d28cd..75adeb6 100644 --- a/packages/core/src/api/graphql/links/BatchHttpLink.ts +++ b/packages/core/src/api/graphql/links/BatchHttpLink.ts @@ -1,4 +1,4 @@ -import { BatchHttpLink as ApolloHttpLink } from '@apollo/client/link/batch-http' +import { BatchHttpLink as ApolloHttpLink } from '@apollo/client/link/batch-http/index.js' import crossfetch from 'cross-fetch' import { endpointGraphQL } from '@/configuration' diff --git a/packages/core/src/api/graphql/links/ErrorLink.ts b/packages/core/src/api/graphql/links/ErrorLink.ts index 1fc2f95..c728351 100644 --- a/packages/core/src/api/graphql/links/ErrorLink.ts +++ b/packages/core/src/api/graphql/links/ErrorLink.ts @@ -1,7 +1,7 @@ import { GlobalStorage } from '@/storage' +import { onError } from '@apollo/client/link/error/index.js' import type { ServerError } from '@apollo/client/core' -import { onError } from '@apollo/client/link/error' export const ErrorLink = onError(({ graphQLErrors, networkError }) => { if (graphQLErrors) { diff --git a/packages/core/src/api/graphql/links/ForwardableLink.ts b/packages/core/src/api/graphql/links/ForwardableLink.ts index f78e18b..1ec0c2f 100644 --- a/packages/core/src/api/graphql/links/ForwardableLink.ts +++ b/packages/core/src/api/graphql/links/ForwardableLink.ts @@ -1,4 +1,4 @@ -import { ApolloLink } from '@apollo/client/core' +import { ApolloLink } from '@apollo/client/core/index.js' export const ForwardableLink = new ApolloLink((operation, forward) => forward(operation)) diff --git a/packages/core/src/api/graphql/links/HttpLink.ts b/packages/core/src/api/graphql/links/HttpLink.ts index d20e169..d6df2e8 100644 --- a/packages/core/src/api/graphql/links/HttpLink.ts +++ b/packages/core/src/api/graphql/links/HttpLink.ts @@ -1,4 +1,4 @@ -import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http' +import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http/index.js' import crossfetch from 'cross-fetch' // Use `cross-fetch` only if `fetch` is not available on the `globalThis` object diff --git a/packages/core/src/api/graphql/links/RetryLink.ts b/packages/core/src/api/graphql/links/RetryLink.ts index 3a34917..808ca98 100644 --- a/packages/core/src/api/graphql/links/RetryLink.ts +++ b/packages/core/src/api/graphql/links/RetryLink.ts @@ -1,4 +1,4 @@ -import { RetryLink as ApolloRetryLink } from '@apollo/client/link/retry' +import { RetryLink as ApolloRetryLink } from '@apollo/client/link/retry/index.js' export const RetryLink = new ApolloRetryLink({ attempts: { diff --git a/packages/core/src/api/graphql/links/TerminatingLink.ts b/packages/core/src/api/graphql/links/TerminatingLink.ts index c93e771..4dc9194 100644 --- a/packages/core/src/api/graphql/links/TerminatingLink.ts +++ b/packages/core/src/api/graphql/links/TerminatingLink.ts @@ -1,4 +1,4 @@ -import { ApolloLink } from '@apollo/client/core' +import { ApolloLink } from '@apollo/client/core/index.js' export const TerminatingLink = new ApolloLink(() => null) diff --git a/packages/core/src/api/graphql/links/VersionLink.ts b/packages/core/src/api/graphql/links/VersionLink.ts index e27d7da..36b4253 100644 --- a/packages/core/src/api/graphql/links/VersionLink.ts +++ b/packages/core/src/api/graphql/links/VersionLink.ts @@ -1,4 +1,4 @@ -import { ApolloLink } from '@apollo/client/core' +import { ApolloLink } from '@apollo/client/core/index.js' import { version } from '@/configuration' diff --git a/packages/react/src/hooks/useQuilttClient.ts b/packages/react/src/hooks/useQuilttClient.ts index 2f95f7f..2097b1a 100644 --- a/packages/react/src/hooks/useQuilttClient.ts +++ b/packages/react/src/hooks/useQuilttClient.ts @@ -1,6 +1,6 @@ 'use client' -import { useApolloClient } from '@apollo/client/react/hooks' +import { useApolloClient } from '@apollo/client/react/hooks/useApolloClient.js' export const useQuilttClient = useApolloClient diff --git a/packages/react/src/providers/QuilttAuthProvider.tsx b/packages/react/src/providers/QuilttAuthProvider.tsx index 77479ad..a597885 100644 --- a/packages/react/src/providers/QuilttAuthProvider.tsx +++ b/packages/react/src/providers/QuilttAuthProvider.tsx @@ -3,7 +3,7 @@ import type { FC, PropsWithChildren } from 'react' import { useEffect, useMemo } from 'react' -import { ApolloProvider } from '@apollo/client/react' +import { ApolloProvider } from '@apollo/client/react/context/ApolloProvider.js' import { InMemoryCache, QuilttClient } from '@quiltt/core'