/// import { Component, ReactNode } from 'react'; import { ICache, IMutation, IQuery } from '../interfaces/index'; export interface IConnectProps { children: (props: UrqlProps) => ReactNode; subscription?: IQuery; query?: IQuery | IQuery[]; mutation?: IMutation; updateSubscription?: (prev: object | null, next: object | null) => object | null; cache?: boolean; typeInvalidation?: boolean; shouldInvalidate?: (changedTypes: string[], typeNames: string[], response: object, data: object) => boolean; } /** * Urql's render props. */ export declare type UrqlProps = { /** * Urql cache */ cache: ICache; /** * The data returned by your Urql query. */ data: Data | null; /** * Query error, if present. */ errors: any; /** * Returns true if Urql is fetching data */ fetching: boolean; /** * This is like loading but it's false by default, and becomes true after * the first time your query loads. This makes initial loading states easy * and reduces flicker on subsequent fetch/refetches. */ loaded: boolean; /** * Manually refetch the query. You can skip the cache, hit the server * and repopulate the cache by calling this like `refetch({ skipCache: true })`. */ refetch: (options: { skipFetch?: boolean; }, initial?: boolean) => void; /** * Manually refetch all queries from the cache. */ refreshAllFromCache: () => void; } & Mutations; export default class Connect extends Component> { render(): JSX.Element; }