import { IResolverObject } from 'graphql-tools'; export interface CreateContext { data: any; response: any; graphqlContext: any; } export interface UpdateContext { where: any; data: Record; response: any; graphqlContext: any; } export interface DeleteContext { where: any; response: any; graphqlContext: any; } export interface Hook { wrapCreate?: (context: CreateContext, createOperation: () => Promise) => Promise; wrapUpdate?: (context: UpdateContext, updateOperation: () => Promise) => Promise; wrapDelete?: (context: DeleteContext, destroyOperation: () => Promise) => Promise; resolveFields?: IResolverObject; }