Class GraphQLHttpServer<TContext>
Constructors
Properties
Readonly
schema
schema: GraphQLSchema
Methods
expressHandler
- expressHandler(): ((req: ExpressRequestLike, res: ExpressResponseLike, next: ExpressNextFunctionLike) => Promise<void>)
Returns ((req: ExpressRequestLike, res: ExpressResponseLike, next: ExpressNextFunctionLike) => Promise<void>)
- (req, res, next): Promise<void>
Parameters
- req: ExpressRequestLike
- res: ExpressResponseLike
- next: ExpressNextFunctionLike
Returns Promise<void>
handleExpress
- handleExpress(req, res, next): Promise<void>
Parameters
- req: ExpressRequestLike
- res: ExpressResponseLike
- next: ExpressNextFunctionLike
Returns Promise<void>
handleKoa
- handleKoa(ctx, next?): Promise<void>
Parameters
- ctx: KoaContextLike
Optional
next: KoaNextFunctionLike
Returns Promise<void>
koaHandler
- koaHandler(): ((ctx: KoaContextLike, next: KoaNextFunctionLike) => Promise<void>)
Returns ((ctx: KoaContextLike, next: KoaNextFunctionLike) => Promise<void>)
- (ctx, next): Promise<void>
Parameters
- ctx: KoaContextLike
- next: KoaNextFunctionLike
Returns Promise<void>
parseBody
- parseBody(body): Record<string, unknown>
Returns Record<string, unknown>
serializeError
- serializeError(err): GraphQLError
Returns GraphQLError
validate
- validate(request, args): GraphQLError[]
Returns GraphQLError[]