Skip to content

Commit

Permalink
docs(resolvers): added better explanation about callbackWaitsForEmpty…
Browse files Browse the repository at this point in the history
…EventLoop
  • Loading branch information
H4ad committed Feb 28, 2022
1 parent b31f153 commit ff20236
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/v2/resolvers/aws-context.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import {
//#endregion

/**
* The class that implements the resolver by using the AWS Context object
* The class that implements the resolver by using the AWS Context object.
*
* @note```md
* @note To use this resolver, 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.
*
* ```md
* From the AWS Documentation, describing the functions used in this resolver:
* // Functions for compatibility with earlier Node.js Runtime v0.10.42
* // No longer documented, so they are deprecated, but they still work
Expand Down
2 changes: 2 additions & 0 deletions src/v2/resolvers/callback.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export type ServerlessCallback<TResponse> = (

/**
* The class that implements the resolver using the callback function sent by serverless
*
* @note 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.
*/
export class CallbackResolver
implements ResolverContract<any, any, ServerlessCallback<any>, any>
Expand Down

0 comments on commit ff20236

Please sign in to comment.