/// /// /// import { GraphQLSchema } from "graphql"; import { Prisma } from "prisma-binding"; import { IResolvers, MergeInfo, UnitOrList } from "graphql-tools/dist/Interfaces"; import * as Koa from "koa"; import { BunjilOptions, AuthorizationCallbackOptions, playgroundOptions, OnTypeConflictCallback } from "./types"; declare class Bunjil { private debug; private logger; playgroundOptions: playgroundOptions; koa: Koa; private router; serverConfig: { port?: number; tracing: boolean; cacheControl: boolean; disableBunjilCache: boolean; useApolloCache: boolean; useApolloTracing: boolean; disableIntrospection: boolean; usePersistedQueries: boolean; }; endpoints: { graphQL: string; subscriptions: string | undefined; playground: string | undefined; }; private graphQL; private wahn; private cache; private sanitiseMiddleware; private persistedQueriesMiddleware; constructor(options: BunjilOptions); private resolverHook(root, args, context, info, next); private finaliseResolvers(); private finaliseGraphqlRoutes(); start(): Promise; private addForwardedResolver(resolver, forwardToKey); addPrismaSchema({typeDefs, prisma, contextKey}: { typeDefs: string; prisma: Prisma | any; contextKey?: string | undefined; }): void; addSchema({schemas, onTypeConflict, resolvers}: { schemas: (GraphQLSchema | string)[]; onTypeConflict?: OnTypeConflictCallback | undefined; resolvers?: UnitOrList IResolvers)>; }): void; addContext(key: string, value: any): void; authenticationMiddleware(ctx: Koa.Context, next: () => Promise): Promise; authorizationCallback({action, resource, context}: AuthorizationCallbackOptions): boolean; addPersistedQueries(persistedQueries: any): void; getPersistedQueries(): any; } export { Bunjil, BunjilOptions };