-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: include custom conversation handlers in lambdaFunctions for downstream processing #361
Conversation
🦋 Changeset detectedLatest commit: 10f96d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mind seeing an added test or two for this! 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything about this worth putting under test with this change?
Edit: Jon and I had the exact same thought.
2312786
to
7be441b
Compare
Good call, thanks. Addressed in 7be441b |
Description of changes
Context
a.conversation({ })
schema definitions optionally allow ahandler
to be included. This is for some advanced use cases like custom tools within the Lambda function.Problem
Custom conversation handlers aren't correctly referenced in the Data construct because they're not included in the function map passed from data-schema --> backend-data --> data-construct
Change
The Data construct needs to reference the custom handler Lambda function to create the AppSync data source.
defineFunction
+a.handler.function
do this today by keeping a map offunction-name
-->DefineFunction
, which gets passed to backend-data, then ultimately to the Data construct.This PR adopts that same methodology for custom conversation handlers.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.