UNPKG

naystack

Version:

A stack built with tight Next + Drizzle + GraphQL

17 lines (14 loc) 623 B
import { ApolloServerPlugin } from '@apollo/server'; import { NextRequest } from 'next/server'; import { AuthChecker, NonEmptyArray } from 'type-graphql'; declare function initGraphQLServer({ authChecker, resolvers, plugins, context, }: { authChecker?: AuthChecker<any>; resolvers: NonEmptyArray<Function>; plugins?: ApolloServerPlugin[]; context?: (req: NextRequest) => Promise<any>; }): Promise<{ GET: (request: NextRequest) => Promise<Response>; POST: (request: NextRequest) => Promise<Response>; context: ((req: NextRequest) => Promise<any>) | undefined; }>; export { initGraphQLServer };