Open fab-mindflow opened 1 year ago
Hi @fab-mindflow , thanks for reporting this. It would be great if you could share the repro code for this as well.
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Sorry, tbh, I don't have time right now to create a small sample. And the workaround is ok for now.
Describe the bug
When creating nested stacks with AppSync resolvers, they are actually attached to the stack where the
api
is defined instead of thedatasource
.https://github.com/aws/aws-cdk/blob/1105514fc88ae4637a5d187a48ff1a37a4932579/packages/%40aws-cdk/aws-appsync/lib/data-source.ts#L136
Expected Behavior
Resolvers should have their datasource as parent resource.
Current Behavior
Resolvers have the api as parent resource.
Reproduction Steps
Create nested stacks with datasource and resolvers attached to an api defined in the parent stack.
Possible Solution
Construct a
Resolver
directly, not thecreateResolver
function.Additional Information/Context
No response
CDK CLI Version
2.68.1
Framework Version
No response
Node.js Version
16
OS
macOS
Language
Typescript
Language Version
No response
Other information
No response