UNPKG

826 BTypeScriptView Raw
1import { FragmentReplacement } from 'graphql-binding';
2import { GraphQLResolveInfo } from 'graphql';
3export interface Filter {
4 [key: string]: any;
5}
6export interface Exists {
7 [rootField: string]: (filter: Filter) => Promise<boolean>;
8}
9export interface BasePrismaOptions {
10 fragmentReplacements?: FragmentReplacement[];
11 endpoint?: string;
12 secret?: string;
13 debug?: boolean;
14 disableCache?: boolean;
15}
16export interface PrismaOptions extends BasePrismaOptions {
17 typeDefs: string;
18}
19export interface QueryMap {
20 [rootField: string]: (args?: {
21 [key: string]: any;
22 }, info?: GraphQLResolveInfo | string) => Promise<any>;
23}
24export interface SubscriptionMap {
25 [rootField: string]: (args?: any, info?: GraphQLResolveInfo | string) => AsyncIterator<any> | Promise<AsyncIterator<any>>;
26}