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

(Release 3.7) Rename useFragment -> useFragment_experimental #10075

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
6 changes: 3 additions & 3 deletions src/__tests__/__snapshots__/exports.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Array [
"throwServerError",
"toPromise",
"useApolloClient",
"useFragment",
"useFragment_experimental",
"useLazyQuery",
"useMutation",
"useQuery",
Expand Down Expand Up @@ -243,7 +243,7 @@ Array [
"parser",
"resetApolloContext",
"useApolloClient",
"useFragment",
"useFragment_experimental",
"useLazyQuery",
"useMutation",
"useQuery",
Expand Down Expand Up @@ -282,7 +282,7 @@ Array [
exports[`exports of public entry points @apollo/client/react/hooks 1`] = `
Array [
"useApolloClient",
"useFragment",
"useFragment_experimental",
"useLazyQuery",
"useMutation",
"useQuery",
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/__tests__/useFragment.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { renderHook } from '@testing-library/react-hooks';
import userEvent from '@testing-library/user-event';
import { act } from "react-dom/test-utils";

import { useFragment } from "../useFragment";
import { useFragment_experimental as useFragment } from "../useFragment";
import { MockedProvider } from "../../../testing";
import { ApolloProvider } from "../../context";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useFragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface UseFragmentResult<TData> {
lastCompleteResult?: UseFragmentResult<TData>;
}

export function useFragment<TData, TVars>(
export function useFragment_experimental<TData, TVars>(
options: UseFragmentOptions<TData, TVars>,
): UseFragmentResult<TData> {
const { cache } = useApolloClient();
Expand Down