Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation messages to moved exports. #301

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions packages/experimental-nextjs-app-support/src/rsc/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
export {
registerApolloClient,
type TransportedQueryRef,
import {
registerApolloClient as _registerApolloClient,
type TransportedQueryRef as _TransportedQueryRef,
} from "@apollo/experimental-nextjs-app-support";

/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { registerApolloClient } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const registerApolloClient = _registerApolloClient;

/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import type { TransportedQueryRef } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export type TransportedQueryRef<
TData = unknown,
TVariables = unknown,
> = _TransportedQueryRef<TData, TVariables>;
169 changes: 154 additions & 15 deletions packages/experimental-nextjs-app-support/src/ssr/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,156 @@
export {
InMemoryCache as NextSSRInMemoryCache,
ApolloClient as NextSSRApolloClient,
SSRMultipartLink,
DebounceMultipartResponsesLink,
RemoveMultipartDirectivesLink,
ApolloNextAppProvider,
resetApolloClientSingletons as resetNextSSRApolloSingletons,
type TransportedQueryRef,
import {
InMemoryCache,
ApolloClient,
resetApolloClientSingletons,
SSRMultipartLink as _SSRMultipartLink,
DebounceMultipartResponsesLink as _DebounceMultipartResponsesLink,
RemoveMultipartDirectivesLink as _RemoveMultipartDirectivesLink,
ApolloNextAppProvider as _ApolloNextAppProvider,
type TransportedQueryRef as _TransportedQueryRef,
} from "@apollo/experimental-nextjs-app-support";
export {
useBackgroundQuery,
useFragment,
useQuery,
useReadQuery,
useSuspenseQuery,
import {
useBackgroundQuery as _useBackgroundQuery,
useFragment as _useFragment,
useQuery as _useQuery,
useReadQuery as _useReadQuery,
useSuspenseQuery as _useSuspenseQuery,
} from "@apollo/client/index.js";

/**
* @deprecated
* This import has been renamed to `InMemoryCache` and moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { InMemoryCache } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const NextSSRInMemoryCache = InMemoryCache;
/**
* @deprecated
* This import has been renamed to `ApolloClient` and moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { ApolloClient } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const NextSSRApolloClient = ApolloClient;
/**
* @deprecated
* This import has been renamed to `resetApolloClientSingletons` and moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { resetApolloClientSingletons } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const resetNextSSRApolloSingletons = resetApolloClientSingletons;
/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { SSRMultipartLink } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const SSRMultipartLink = _SSRMultipartLink;
/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { DebounceMultipartResponsesLink } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const DebounceMultipartResponsesLink = _DebounceMultipartResponsesLink;
/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { RemoveMultipartDirectivesLink } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const RemoveMultipartDirectivesLink = _RemoveMultipartDirectivesLink;
/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import { ApolloNextAppProvider } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export const ApolloNextAppProvider = _ApolloNextAppProvider;
/**
* @deprecated
* This import has moved to `"@apollo/experimental-nextjs-app-support"`.
*
* Please update your import to
* ```ts
* import type { TransportedQueryRef } from "@apollo/experimental-nextjs-app-support";
* ```
*/
export type TransportedQueryRef<
TData = unknown,
TVariables = unknown,
> = _TransportedQueryRef<TData, TVariables>;
/**
* @deprecated
* Importing `useBackgroundQuery` from this package is no longer necessary.
* Import it directly from `@apollo/client` instead.

* Please update your import to
* ```ts
* import { useBackgroundQuery } from "@apollo/client";
* ```
*/
export const useBackgroundQuery = _useBackgroundQuery;
/**
* @deprecated
* Importing `useFragment` from this package is no longer necessary.
* Import it directly from `@apollo/client` instead.

* Please update your import to
* ```ts
* import { useFragment } from "@apollo/client";
* ```
*/
export const useFragment = _useFragment;
/**
* @deprecated
* Importing `useQuery` from this package is no longer necessary.
* Import it directly from `@apollo/client` instead.

* Please update your import to
* ```ts
* import { useQuery } from "@apollo/client";
* ```
*/
export const useQuery = _useQuery;
/**
* @deprecated
* Importing `useReadQuery` from this package is no longer necessary.
* Import it directly from `@apollo/client` instead.

* Please update your import to
* ```ts
* import { useReadQuery } from "@apollo/client";
* ```
*/
export const useReadQuery = _useReadQuery;
/**
* @deprecated
* Importing `useSuspenseQuery` from this package is no longer necessary.
* Import it directly from `@apollo/client` instead.

* Please update your import to
* ```ts
* import { useSuspenseQuery } from "@apollo/client";
* ```
*/
export const useSuspenseQuery = _useSuspenseQuery;
Loading