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 react/internal entry point, reorganize imports #11426

Closed
wants to merge 136 commits into from
Closed
Show file tree
Hide file tree
Changes from 135 commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
0f758f7
Initial implementation of query preloader
jerelmiller Nov 29, 2023
0f7616f
Export types from query preloader
jerelmiller Dec 1, 2023
d25d5d9
Add returnPartialData option
jerelmiller Dec 1, 2023
77e11db
Add type tests on preloadQuery for variables argument
jerelmiller Dec 1, 2023
1eb5a96
Add function overloads to handle various options when preloading query
jerelmiller Dec 1, 2023
dd25239
Add .test.tsx suffix to test file
jerelmiller Dec 1, 2023
8300ddc
Only run query preloader tests with React 18
jerelmiller Dec 1, 2023
8cc96d7
Fix regression in variables type
jerelmiller Dec 1, 2023
cf758b2
Pass query as first arg and options as second
jerelmiller Dec 1, 2023
165e0ef
Create prebuilt scenarios that can be used for test cases
jerelmiller Dec 1, 2023
bc1ac5d
Write first test for loading a query outside react
jerelmiller Dec 1, 2023
76426c4
Fix type name in type tests
jerelmiller Dec 1, 2023
cc9c88c
Add another test that checks loading a query with variables
jerelmiller Dec 1, 2023
d72087e
Return dispose as 2nd tuple item and remove refetch/fetchMore
jerelmiller Dec 4, 2023
ca46ed4
Fix incorrect expectation in test
jerelmiller Dec 4, 2023
0739cea
Run prettier
jerelmiller Dec 4, 2023
e01f939
Run prettier on createQueryPreloader
jerelmiller Dec 4, 2023
ff3a6b5
Default to empty queryKey in preloadQuery
jerelmiller Dec 4, 2023
bbea69d
Add test to ensure calling dispose will dispose of the query
jerelmiller Dec 4, 2023
748cfb8
Add ability to determine if the query ref has been disposed
jerelmiller Dec 5, 2023
7b913e7
Warn if using disposed query ref in useReadQuery
jerelmiller Dec 5, 2023
e80697b
Add test to ensure cache updates are handled
jerelmiller Dec 5, 2023
c24075c
Add test to ensure context is passed to the link
jerelmiller Dec 5, 2023
eb0bd84
Add test to ensure errors are thrown and error boundary is shown
jerelmiller Dec 5, 2023
7542b1f
Add test to ensure errorPolicy: 'all' works as expected
jerelmiller Dec 5, 2023
642247c
Add test to ensure errorPolicy: 'ignore' works as expected
jerelmiller Dec 5, 2023
254e0d4
Make dispose query ref warning a dev only warning
jerelmiller Dec 6, 2023
fe49b45
Fix description of test to match test implementation
jerelmiller Dec 6, 2023
1238ab4
Add test to ensure queryKey is respected
jerelmiller Dec 6, 2023
418c29a
Add test to ensure returnPartialData works as expected
jerelmiller Dec 6, 2023
69d363b
Refactor tests to use common setup
jerelmiller Dec 6, 2023
342a27d
Add error boundary to default test app
jerelmiller Dec 6, 2023
5fdf1a8
Move everything into createDefaultTestApp
jerelmiller Dec 6, 2023
31fb337
Create new render helper that renders default app
jerelmiller Dec 6, 2023
f746ea6
Combine renderDefaultTestApp with renderDefaultTestApp
jerelmiller Dec 6, 2023
352eee1
Combine renderWithClient and renderDefaultTestApp
jerelmiller Dec 6, 2023
f96ed34
Add test to ensure canonizeResults can be set
jerelmiller Dec 6, 2023
5d35f83
Add test to ensure canonical results can be disabled
jerelmiller Dec 6, 2023
a4c577e
Fix formatting in scenarios file
jerelmiller Dec 6, 2023
a1c2e4c
Add test to ensure network-only fetch policy is honored
jerelmiller Dec 6, 2023
7bad689
Add test for cache-and-network
jerelmiller Dec 6, 2023
00c36e3
Add test to ensure cached data is returned immediately
jerelmiller Dec 6, 2023
085fd05
Add test to ensure partial data in cache is ignored
jerelmiller Dec 6, 2023
5505479
Minor tweak to test description
jerelmiller Dec 6, 2023
4674fa0
Add test to ensure deferred queries work as expected
jerelmiller Dec 6, 2023
4cdcf96
Add first test and implementation for usePreloadedQueryHandlers
jerelmiller Dec 6, 2023
aaf4b85
Add transition support for usePreloadedQueryHandlers
jerelmiller Dec 7, 2023
afc56e7
Add test to ensure usePreloadedQueryHandlers does not overwrite promise
jerelmiller Dec 7, 2023
3b29723
Remove updateOptions function for now
jerelmiller Dec 7, 2023
583d47a
Minor adjustment to test description
jerelmiller Dec 7, 2023
ec3c615
Add TVariables to QueryReference
jerelmiller Dec 7, 2023
a1ef63e
Infer TVariables from QueryReference for usePreloadedQueryHandlers
jerelmiller Dec 7, 2023
9cdbc30
Add tests to ensure refetchWritePolicy works correctly
jerelmiller Dec 7, 2023
447194c
Publicly export usePreloadedQueryHandlers
jerelmiller Dec 7, 2023
90e280f
Update snapshot exports tests
jerelmiller Dec 7, 2023
2270972
WIP changeset
jerelmiller Dec 7, 2023
3c2a6d8
Merge branch 'release-3.9' into jerel/load-query-outside-react
jerelmiller Dec 7, 2023
59f25e0
Include a retain function on the wrapped query ref
jerelmiller Dec 7, 2023
489dddf
Don't auto retain query ref when preloading
jerelmiller Dec 7, 2023
ebbea5f
Add todo tests for retaining
jerelmiller Dec 7, 2023
13c4e9a
Remove never variable types in type tests
jerelmiller Dec 7, 2023
f108a2d
Update usePreloadedQueryHandlers tests to use new signature
jerelmiller Dec 7, 2023
3122df4
Auto retain queryRef in useReadQuery
jerelmiller Dec 7, 2023
cf10e84
Remove deleted export from query preloader
jerelmiller Dec 7, 2023
ef13893
Remove extra newlines in warning
jerelmiller Dec 7, 2023
88ceeff
Fix more references to TVariables for QueryReference
jerelmiller Dec 7, 2023
0a80d4f
Add a toPromise function with some tests
jerelmiller Dec 7, 2023
3ae9a52
Fix ts issues from change to TVariables
jerelmiller Dec 7, 2023
5a2de9f
Default to any for QueryReference TVariables
jerelmiller Dec 7, 2023
d05316d
Simplify types to get it working
jerelmiller Dec 8, 2023
feb37e2
Remove query reference test for now
jerelmiller Dec 9, 2023
0cce22f
Only support toPromise without maxTime
jerelmiller Dec 9, 2023
ec28228
Remove unneeded arg to getWrappedPromise
jerelmiller Dec 9, 2023
844551d
move promise unwrapping to toPromise function on the query ref
jerelmiller Dec 9, 2023
d3dc0b8
Return generic promise from toPromise
jerelmiller Dec 9, 2023
ea14e6e
Remove unneeded TVariables on unwrapQueryRef
jerelmiller Dec 9, 2023
b5aef12
Remove unneded TVaraibles from queryRef arg to updateWrappedQueryRef
jerelmiller Dec 9, 2023
a1b834a
Simplify internal FetchMoreOptions
jerelmiller Dec 9, 2023
2bb69e4
Remove unneeded type cast in SuspenseCache
jerelmiller Dec 9, 2023
75ba7ea
Remove unused import in QueryReference
jerelmiller Dec 9, 2023
76f5d62
Add tests that ensure usePreloadedQueryHandlers can attach to queryRe…
jerelmiller Dec 9, 2023
4fed642
Convert transition test to profiler
jerelmiller Dec 9, 2023
330d6ad
Add test and fix to ensure usePreloadedQueryHandlers refetch can be c…
jerelmiller Dec 9, 2023
e284c6f
Rename usePreloadedQueryHandlers to useQueryRefHandlers
jerelmiller Dec 9, 2023
09d7451
Rerun exports
jerelmiller Dec 9, 2023
8da55d2
Add render helpers in testing utils
jerelmiller Dec 11, 2023
26fb4ef
Use renderWithClient helper in useQueryRefHandlers
jerelmiller Dec 11, 2023
558f0a1
Calling retain on a disposed query ref does nothing
jerelmiller Dec 11, 2023
6cb99e5
Fix query preloader test due to changes in API
jerelmiller Dec 11, 2023
f0d2f97
Merge branch 'release-3.9' into jerel/load-query-outside-react
jerelmiller Dec 11, 2023
4f3806a
Use renderHook for dispose test
jerelmiller Dec 11, 2023
4d77d9b
Warn again when passing a different disposed query ref to useReadQuery
jerelmiller Dec 11, 2023
fc757b1
Add test to ensure auto dispose timer kicks in on preloading
jerelmiller Dec 11, 2023
51df7c2
Add test to ensure configured auto dispose timer is honored
jerelmiller Dec 11, 2023
e755d82
Add test to ensure useReadQuery auto retains the query ref
jerelmiller Dec 11, 2023
19e1056
Add test to ensure manual retain and useReadQuery work correctly
jerelmiller Dec 11, 2023
7561ee9
Fix variables type errors when other options are present
jerelmiller Dec 11, 2023
74d248c
Use Record<string, never> for never variables type
jerelmiller Dec 11, 2023
482dc88
Use Record<string, never> in simple variables case
jerelmiller Dec 11, 2023
a768c9e
Add a couple more type tests for other options with variables
jerelmiller Dec 11, 2023
5abedcd
Update type tests to test for explicit type args
jerelmiller Dec 11, 2023
bf2da75
Add warning when calling retain on a disposed queryRef
jerelmiller Dec 11, 2023
ee38f4c
Add any to ObservableQuery type on constructor in InternalQueryReference
jerelmiller Dec 11, 2023
29fce00
Tweak warning message in useReadQuery
jerelmiller Dec 11, 2023
005c013
Only retain the queryRef if not already disposed
jerelmiller Dec 11, 2023
6ce3304
Add test to ensure disposing of query after mounting useReadQuery works
jerelmiller Dec 11, 2023
62b6e9c
Add paginated case to scenarios
jerelmiller Dec 11, 2023
2c9dec2
Slight test reorg
jerelmiller Dec 11, 2023
9b60a74
Small test description update
jerelmiller Dec 11, 2023
1bc7cc8
Add tests to ensure fetchMore works with useQueryRefHandlers
jerelmiller Dec 11, 2023
41d0123
Add tests to ensure useQueryRefHandlers can call fetchMore from uBQ a…
jerelmiller Dec 11, 2023
516c24e
Add test to ensure fetchMore works with startTransition
jerelmiller Dec 11, 2023
23ca5ff
Minor tweak to simplify test
jerelmiller Dec 11, 2023
70ce235
Inline creation of client in test
jerelmiller Dec 11, 2023
74689b4
Add custom matcher to determine if query ref was disposed
jerelmiller Dec 12, 2023
f402d6a
Use toBeDisposed in createQueryPreloader tests
jerelmiller Dec 12, 2023
0f1c130
Move preloadQuery types into exported interface
jerelmiller Dec 12, 2023
10c6db9
Use invariant from ts-invariant
jerelmiller Dec 12, 2023
d353057
Don't use invariant in toBeDisposed
jerelmiller Dec 12, 2023
a61e353
Import getSuspenseCache from cache/index.js
jerelmiller Dec 12, 2023
51ac881
Ensure mocks are used for renderWithMocks helper
jerelmiller Dec 12, 2023
f0462e7
Better changeset
jerelmiller Dec 12, 2023
3178fa1
Update API report
jerelmiller Dec 12, 2023
a16db66
add `react/internal` entry point, reorganize imports
phryneas Dec 12, 2023
c526c7a
fix up tests
phryneas Dec 12, 2023
a2d17de
execute "Compare Build Output" for all PRs
phryneas Dec 12, 2023
dca7a91
fix up some imports
phryneas Dec 12, 2023
e72d3c5
change re-export to type export
phryneas Dec 12, 2023
fae470d
chores
phryneas Dec 12, 2023
6883f83
size-limits
phryneas Dec 12, 2023
9c11e41
add changeset
phryneas Dec 12, 2023
e660027
update size-limits
phryneas Dec 12, 2023
789a653
Merge branch 'jerel/load-query-outside-react' into pr/react-internal
phryneas Dec 12, 2023
a319ca3
udpate size-limits
phryneas Dec 12, 2023
3888109
update exports
phryneas Dec 12, 2023
48726fe
remove changeset
phryneas Dec 13, 2023
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
119 changes: 103 additions & 16 deletions .api-reports/api-report-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,9 @@ type ConcastSourcesIterable<T> = Iterable<Source<T>>;
export interface Context extends Record<string, any> {
}

// @public (undocumented)
export function createQueryPreloader(client: ApolloClient<any>): PreloadQueryFunction;

// @public (undocumented)
namespace DataProxy {
// (undocumented)
Expand Down Expand Up @@ -669,6 +672,9 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
type DisposeFn = () => void;

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -864,13 +870,15 @@ interface IncrementalPayload<TData, TExtensions> {
// @public (undocumented)
class InternalQueryReference<TData = unknown> {
// Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts
constructor(observable: ObservableQuery<TData>, options: InternalQueryReferenceOptions);
constructor(observable: ObservableQuery<TData, any>, options: InternalQueryReferenceOptions);
// (undocumented)
applyOptions(watchQueryOptions: ObservedOptions): QueryRefPromise<TData>;
// Warning: (ae-forgotten-export) The symbol "ObservedOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
didChangeOptions(watchQueryOptions: ObservedOptions): boolean;
// (undocumented)
get disposed(): boolean;
// Warning: (ae-forgotten-export) The symbol "FetchMoreOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -1377,6 +1385,54 @@ interface PendingPromise<TValue> extends Promise<TValue> {
status: "pending";
}

// @public (undocumented)
export type PreloadQueryFetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;

// @public (undocumented)
export interface PreloadQueryFunction {
// Warning: (ae-forgotten-export) The symbol "PreloadQueryOptionsArg" needs to be exported by the entry point index.d.ts
//
// (undocumented)
<TData, TVariables extends OperationVariables, TOptions extends Omit<PreloadQueryOptions, "variables">>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>, TOptions>): QueryReference<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables>;
// (undocumented)
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: PreloadQueryOptions<NoInfer<TVariables>> & {
returnPartialData: true;
errorPolicy: "ignore" | "all";
}): QueryReference<DeepPartial<TData> | undefined, TVariables>;
// (undocumented)
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: PreloadQueryOptions<NoInfer<TVariables>> & {
errorPolicy: "ignore" | "all";
}): QueryReference<TData | undefined, TVariables>;
// (undocumented)
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: PreloadQueryOptions<NoInfer<TVariables>> & {
returnPartialData: true;
}): QueryReference<DeepPartial<TData>, TVariables>;
// (undocumented)
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: PreloadQueryOptionsArg<NoInfer<TVariables>>): QueryReference<TData, TVariables>;
}

// Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type PreloadQueryOptions<TVariables extends OperationVariables = OperationVariables> = {
canonizeResults?: boolean;
context?: Context;
errorPolicy?: ErrorPolicy;
fetchPolicy?: PreloadQueryFetchPolicy;
queryKey?: string | number | any[];
returnPartialData?: boolean;
refetchWritePolicy?: RefetchWritePolicy;
} & VariablesOption<TVariables>;

// @public (undocumented)
type PreloadQueryOptionsArg<TVariables extends OperationVariables, TOptions = unknown> = [TVariables] extends [never] ? [
options?: PreloadQueryOptions<never> & TOptions
] : {} extends OnlyRequiredProperties<TVariables> ? [
options?: PreloadQueryOptions<NoInfer<TVariables>> & Omit<TOptions, "variables">
] : [
options: PreloadQueryOptions<NoInfer<TVariables>> & Omit<TOptions, "variables">
];

// @public (undocumented)
type Primitive = null | undefined | string | number | boolean | symbol | bigint;

Expand Down Expand Up @@ -1642,18 +1698,24 @@ interface QueryOptions<TVariables = OperationVariables, TData = any> {
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "useBackgroundQuery" has more than one declaration; you need to add a TSDoc member reference selector
//
// @public
export interface QueryReference<TData = unknown> {
export interface QueryReference<TData = unknown, TVariables = unknown> {
// (undocumented)
[PROMISE_SYMBOL]: QueryRefPromise<TData>;
// Warning: (ae-forgotten-export) The symbol "InternalQueryReference" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly [QUERY_REFERENCE_SYMBOL]: InternalQueryReference<TData>;
// Warning: (ae-forgotten-export) The symbol "DisposeFn" needs to be exported by the entry point index.d.ts
//
// (undocumented)
retain: () => DisposeFn;
// (undocumented)
toPromise(): Promise<ApolloQueryResult<TData>>;
}

// Warning: (ae-forgotten-export) The symbol "PromiseWithState" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
// @internal (undocumented)
type QueryRefPromise<TData> = PromiseWithState<ApolloQueryResult<TData>>;

// @public (undocumented)
Expand Down Expand Up @@ -1998,7 +2060,7 @@ export function useApolloClient(override?: ApolloClient<object>): ApolloClient<o
//
// @public (undocumented)
export function useBackgroundQuery<TData, TVariables extends OperationVariables, TOptions extends Omit<BackgroundQueryHookOptions<TData>, "variables">>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & TOptions): [
(QueryReference<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData> | (TOptions["skip"] extends boolean ? undefined : never)),
(QueryReference<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)),
UseBackgroundQueryResult<TData, TVariables>
];

Expand All @@ -2007,15 +2069,15 @@ export function useBackgroundQuery<TData = unknown, TVariables extends Operation
returnPartialData: true;
errorPolicy: "ignore" | "all";
}): [
QueryReference<DeepPartial<TData> | undefined>,
QueryReference<DeepPartial<TData> | undefined, TVariables>,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & {
errorPolicy: "ignore" | "all";
}): [
QueryReference<TData | undefined>,
QueryReference<TData | undefined, TVariables>,
UseBackgroundQueryResult<TData, TVariables>
];

Expand All @@ -2024,28 +2086,31 @@ export function useBackgroundQuery<TData = unknown, TVariables extends Operation
skip: boolean;
returnPartialData: true;
}): [
QueryReference<DeepPartial<TData>> | undefined,
QueryReference<DeepPartial<TData>, TVariables> | undefined,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & {
returnPartialData: true;
}): [
QueryReference<DeepPartial<TData>>,
QueryReference<DeepPartial<TData>, TVariables>,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: BackgroundQueryHookOptionsNoInfer<TData, TVariables> & {
skip: boolean;
}): [
QueryReference<TData> | undefined,
QueryReference<TData, TVariables> | undefined,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: BackgroundQueryHookOptionsNoInfer<TData, TVariables>): [QueryReference<TData>, UseBackgroundQueryResult<TData, TVariables>];
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: BackgroundQueryHookOptionsNoInfer<TData, TVariables>): [
QueryReference<TData, TVariables>,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken): [undefined, UseBackgroundQueryResult<TData, TVariables>];
Expand All @@ -2054,13 +2119,13 @@ export function useBackgroundQuery<TData = unknown, TVariables extends Operation
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (BackgroundQueryHookOptionsNoInfer<TData, TVariables> & {
returnPartialData: true;
})): [
QueryReference<DeepPartial<TData>> | undefined,
QueryReference<DeepPartial<TData>, TVariables> | undefined,
UseBackgroundQueryResult<TData, TVariables>
];

// @public (undocumented)
export function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: SkipToken | BackgroundQueryHookOptionsNoInfer<TData, TVariables>): [
QueryReference<TData> | undefined,
QueryReference<TData, TVariables> | undefined,
UseBackgroundQueryResult<TData, TVariables>
];

Expand Down Expand Up @@ -2120,7 +2185,7 @@ export function useLoadableQuery<TData = unknown, TVariables extends OperationVa
// @public (undocumented)
export type UseLoadableQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = [
LoadQueryFunction<TVariables>,
QueryReference<TData> | null,
QueryReference<TData, TVariables> | null,
{
fetchMore: FetchMoreFunction<TData, TVariables>;
refetch: RefetchFunction<TData, TVariables>;
Expand All @@ -2134,6 +2199,17 @@ export function useMutation<TData = any, TVariables = OperationVariables, TConte
// @public (undocumented)
export function useQuery<TData = any, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: QueryHookOptions<NoInfer<TData>, NoInfer<TVariables>>): QueryResult<TData, TVariables>;

// @public (undocumented)
export function useQueryRefHandlers<TData = unknown, TVariables extends OperationVariables = OperationVariables>(queryRef: QueryReference<TData, TVariables>): UseQueryRefHandlersResult<TData, TVariables>;

// @public (undocumented)
export interface UseQueryRefHandlersResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
// (undocumented)
fetchMore: FetchMoreFunction<TData, TVariables>;
// (undocumented)
refetch: RefetchFunction<TData, TVariables>;
}

// Warning: (ae-forgotten-export) The symbol "ReactiveVar" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
Expand Down Expand Up @@ -2213,6 +2289,17 @@ export interface UseSuspenseQueryResult<TData = unknown, TVariables extends Oper
subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;
}

// @public (undocumented)
type VariablesOption<TVariables extends OperationVariables> = [
TVariables
] extends [never] ? {
variables?: Record<string, never>;
} : {} extends OnlyRequiredProperties<TVariables> ? {
variables?: TVariables;
} : {
variables: TVariables;
};

// @public (undocumented)
type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network";

Expand Down Expand Up @@ -2258,9 +2345,9 @@ interface WatchQueryOptions<TVariables extends OperationVariables = OperationVar
// src/core/types.ts:174:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:201:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:260:2 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:30:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:31:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useLoadableQuery.ts:50:5 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:29:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useBackgroundQuery.ts:30:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts
// src/react/hooks/useLoadableQuery.ts:49:5 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
Loading