Installation
npm install --save @types/mobx-apollo
Summary
This package contains type definitions for mobx-apollo (https://github.com/sonaye/mobx-apollo#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mobx-apollo.
index.d.ts
// Type definitions for mobx-apollo 0.0
// Project: https://github.com/sonaye/mobx-apollo#readme
// Definitions by: Paul Selden <https://github.com/pselden>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
import {
ApolloClient,
ObservableQuery,
WatchQueryOptions,
ApolloError
} from 'apollo-client';
export interface MobxApolloQueryOptions<T> extends WatchQueryOptions {
client: ApolloClient<any>;
onFetch?: ((result: T) => void) | undefined;
onError?: ((error: ApolloError) => void) | undefined;
}
export interface MobxApolloQuery<T> {
loading: boolean;
data?: T | undefined;
error?: ApolloError | undefined;
ref: ObservableQuery<T>;
}
export default function graphql<T>(
options: MobxApolloQueryOptions<T>
): MobxApolloQuery<T>;
Additional Details
- Last updated: Thu, 08 Jul 2021 18:50:52 GMT
- Dependencies: @types/apollo-client
- Global values: none
Credits
These definitions were written by Paul Selden.