Skip to main content

CallbackResolver

@h4ad/serverless-adapter > CallbackResolver

(class) CallbackResolver

The class that implements the resolver using the callback function sent by serverless

Signature:

export declare class CallbackResolver<TEvent, TContext, TResponse> implements ResolverContract<TEvent, TContext, ServerlessCallback<any>, TResponse, void> 

Implements: ResolverContract <TEvent, TContext, ServerlessCallback <any>, TResponse, void>

Remarks

To use this resolver on AWS, you MUST leave \{@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html | callbackWaitsForEmptyEventLoop} as true, otherwise, AWS will not wait for this resolver to resolve.

(method) createResolver

Signature:

createResolver(\{ callback, event, log, respondWithErrors, adapter, }: ResolverProps<TEvent, TContext, ServerlessCallback<any>, TResponse>): Resolver<any, void>;

Parameters

ParameterTypeDescription
{ callback, event, log, respondWithErrors, adapter, }ResolverProps <TEvent, TContext, ServerlessCallback <any>, TResponse>

Returns:

Resolver <any, void>