import React from 'react'; import type { GraphQLError, GraphQLErrorExtensions } from 'graphql'; import type { PropsWithChildren } from 'react'; import type { CombinedError, Client, Operation } from 'urql'; export declare const UrqlContext: React.Context<{ reloadClient: () => void; }>; export type CreateUrqlClient = (opts: { readonly token: string | null; readonly onError: (error: CombinedErrorWithExtensions, operation: Operation) => void; readonly clearToken: () => void; }) => Client; export type UrqlProviderProps = PropsWithChildren<{ readonly onError: (error: CombinedErrorWithExtensions, operation: Operation) => void; readonly createClient: CreateUrqlClient; }>; export type CustomGraphQLError = Omit & { readonly extensions: T; }; export type CombinedErrorWithExtensions = Omit & { readonly graphQLErrors: readonly CustomGraphQLError[]; }; declare function UrqlProvider({ children, createClient, onError }: UrqlProviderProps): React.JSX.Element; export default UrqlProvider;