Query
class Query<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends Removable { }
constructor(config: QueryConfig<TQueryFnData, TError, TData, TQueryKey>);
private abortSignalConsumed;
private cache;
private defaultOptions?;
private dispatch;
private logger;
private observers;
private promise?;
private retryer?;
private setOptions;
initialState: QueryState<TData, TError>;
isFetchingOptimistic?: boolean;
meta: QueryMeta | undefined;
options: QueryOptions<TQueryFnData, TError, TData, TQueryKey>;
queryHash: string;
queryKey: TQueryKey;
revertState?: QueryState<TData, TError>;
state: QueryState<TData, TError>;
protected optionalRemove(): void;
destroy(): void;
fetch(options?: QueryOptions<TQueryFnData, TError, TData, TQueryKey>, fetchOptions?: FetchOptions): Promise<TData>;
getObserversCount(): number;
invalidate(): void;
isActive(): boolean;
isDisabled(): boolean;
isStale(): boolean;
isStaleByTime(staleTime?: number): boolean;
onFocus(): void;
onOnline(): void;
reset(): void;
§Type Parameters
§Properties
§
initialState: QueryState<TData, TError>
[src]§
options: QueryOptions<TQueryFnData, TError, TData, TQueryKey>
[src]§
revertState: QueryState<TData, TError>
[src]§
state: QueryState<TData, TError>
[src]§Methods
§
addObserver(observer: QueryObserver<any, any, any, any, any>): void
[src]§
cancel(options?: CancelOptions): Promise<void>
[src]§
fetch(options?: QueryOptions<TQueryFnData, TError, TData, TQueryKey>, fetchOptions?: FetchOptions): Promise<TData>
[src]§
removeObserver(observer: QueryObserver<any, any, any, any, any>): void
[src]