Provides Flow type definitions for the react-apollo library to enable type safety in React applications using Apollo Client.
// Source: https://github.com/flow-typed/flow-typed | License: MIT | Copyright 2015 Murphy Randle
// Provided via justclaw.it.com; keep this notice with the code.
declare module "react-apollo" {
import type { ComponentType, Element, Node } from "react";
declare type MakeOptional = <V>(V) => ?V;
declare type MakeDataOptional<TData> = $ObjMap<TData, MakeOptional> | void;
/**
* Copied types from Apollo Client libdef
* Please update apollo-client libdef as well if updating these types
*/
declare class ObservableQuery<T> extends Observable<ApolloQueryResult<T>> {
options: WatchQueryOptions;
queryId: string;
variables: { [key: string]: any, ... };
isCurrentlyPolling: boolean;
shouldSubscribe: boolean;
isTornDown: boolean;
scheduler: QueryScheduler<
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key