UNPKG

react-apollo-hooks

Version:

Use [Apollo Client](https://github.com/apollographql/apollo-client) as React [hooks](https://reactjs.org/docs/hooks-intro.html).

9 lines (8 loc) 511 B
import ApolloClient from 'apollo-client'; import { ReactElement, ReactNode } from 'react'; export interface ApolloProviderProps<TCacheShape> { readonly children?: ReactNode; readonly client: ApolloClient<TCacheShape>; } export declare function ApolloProvider<TCacheShape = any>({ client, children, }: ApolloProviderProps<TCacheShape>): ReactElement<ApolloProviderProps<TCacheShape>>; export declare function useApolloClient<TCache = object>(overrideClient?: ApolloClient<TCache>): ApolloClient<TCache>;