You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The graphql handler has a third callback property.
Callback's are not recommended by aws any more although still supported but other packages have moved away from general handling of them. E.G Middy.
It would be ideal to not require a callback property on the graphql handler.
The text was updated successfully, but these errors were encountered:
After digging into this, it appears that this is just a mismatch in typescript types that needs cleaned up. You can see here that the handler is actually implemented as async and does not use the callback parameter. I see now that the official Lambda types from aws-lambda define Handler as
Typescript was happy on my end because the latter type does technically implement the former, but in practice any system using the callback parameter would fail as it goes unused in the code in favor of the async pattern.
If the type is causing issues, I recommend casting it as follows while I get an update pushed:
At the minute the output of startServerAndCreateLambdaHandler with the below returns a handler that expects a callback.
The graphql handler has a third callback property.
Callback's are not recommended by aws any more although still supported but other packages have moved away from general handling of them. E.G Middy.
It would be ideal to not require a callback property on the graphql handler.
The text was updated successfully, but these errors were encountered: