Skip to content

Commit

Permalink
remove experimental from prefetch pagination hook in fbsource
Browse files Browse the repository at this point in the history
Reviewed By: tyao1

Differential Revision: D67533853

fbshipit-source-id: 04bede60afa142b0a5f646715513728eeb02ef61
  • Loading branch information
lynnshaoyu authored and facebook-github-bot committed Jan 2, 2025
1 parent 46a82e4 commit 6efdedc
Show file tree
Hide file tree
Showing 8 changed files with 498 additions and 65 deletions.
6 changes: 3 additions & 3 deletions packages/react-relay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useFragment = require('./relay-hooks/useFragment');
const useLazyLoadQuery = require('./relay-hooks/useLazyLoadQuery');
const useMutation = require('./relay-hooks/useMutation');
const usePaginationFragment = require('./relay-hooks/usePaginationFragment');
const usePrefetchableForwardPaginationFragment_EXPERIMENTAL = require('./relay-hooks/usePrefetchableForwardPaginationFragment_EXPERIMENTAL');
const usePrefetchableForwardPaginationFragment = require('./relay-hooks/usePrefetchableForwardPaginationFragment');
const usePreloadedQuery = require('./relay-hooks/usePreloadedQuery');
const useQueryLoader = require('./relay-hooks/useQueryLoader');
const useRefetchableFragment = require('./relay-hooks/useRefetchableFragment');
Expand Down Expand Up @@ -126,8 +126,8 @@ module.exports = {
usePaginationFragment: usePaginationFragment,
usePreloadedQuery: usePreloadedQuery,
useRefetchableFragment: useRefetchableFragment,
usePrefetchableForwardPaginationFragment_EXPERIMENTAL:
usePrefetchableForwardPaginationFragment_EXPERIMENTAL,
usePrefetchableForwardPaginationFragment:
usePrefetchableForwardPaginationFragment,
useRelayEnvironment: useRelayEnvironment,
useSubscribeToInvalidationState: useSubscribeToInvalidationState,
useSubscription: useSubscription,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

'use strict';

import type {usePrefetchableForwardPaginationFragmentEXPERIMENTALTest_user$key} from './__generated__/usePrefetchableForwardPaginationFragmentEXPERIMENTALTest_user.graphql';
import type {usePrefetchableForwardPaginationFragmentTest_user$key} from './__generated__/usePrefetchableForwardPaginationFragmentTest_user.graphql';

const usePrefetchableForwardPaginationFragment_EXPERIMENTAL = require('../usePrefetchableForwardPaginationFragment_EXPERIMENTAL');
const usePrefetchableForwardPaginationFragment = require('../usePrefetchableForwardPaginationFragment');
const React = require('react');
const {RelayEnvironmentProvider} = require('react-relay/hooks');
const {act, create} = require('react-test-renderer');
Expand All @@ -37,7 +37,7 @@ let hasNextSpy;
let isLoadingNextSpy;

component Container(
userRef: ?usePrefetchableForwardPaginationFragmentEXPERIMENTALTest_user$key,
userRef: ?usePrefetchableForwardPaginationFragmentTest_user$key,
minimalEdgesToFetch: number = 1,
UNSTABLE_extraVariables?: mixed,
) {
Expand All @@ -48,9 +48,9 @@ component Container(
refetch: _refetch,
hasNext,
isLoadingNext,
} = usePrefetchableForwardPaginationFragment_EXPERIMENTAL(
} = usePrefetchableForwardPaginationFragment(
graphql`
fragment usePrefetchableForwardPaginationFragmentEXPERIMENTALTest_user on User
fragment usePrefetchableForwardPaginationFragmentTest_user on User
@refetchable(
queryName: "usePrefetchableForwardPaginationFragmentRefetchQuery"
) {
Expand Down Expand Up @@ -105,15 +105,15 @@ beforeEach(() => {

query = createOperationDescriptor(
graphql`
query usePrefetchableForwardPaginationFragmentEXPERIMENTALTestQuery(
query usePrefetchableForwardPaginationFragmentTestQuery(
$id: ID!
$after: ID
$first: Int
$before: ID
$last: Int
) {
node(id: $id) {
...usePrefetchableForwardPaginationFragmentEXPERIMENTALTest_user
...usePrefetchableForwardPaginationFragmentTest_user
}
}
`,
Expand Down
Loading

0 comments on commit 6efdedc

Please sign in to comment.