Bug: AppSyncEventsResolver
decorators break scope
#3973
Labels
bug
Something isn't working
confirmed
The scope is clear, ready for implementation
event-handler
This item relates to the Event Handler Utility
Expected Behavior
When using the
@onPublish
and@onSubscribed
decorator of theAppSyncEventsResolver
the decorated methods should preserve thethis
scope of the class they belong to.This way, these methods can continue accessing class properties and methods.
Current Behavior
When applying the decorators the decorated method is no longer bound and
this
goes to either the instance ofAppSyncEventsResolver
orundefined
, thus preventing from using other class methods/properties.Code snippet
Steps to Reproduce
N/A
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
22.x
Packaging format used
npm
Execution logs
The text was updated successfully, but these errors were encountered: