Describe the bug
When trying to remove a @connection between 2 GQL types, the amplify push fails as the CF update attempts to remove the output from the stacks for the types before the dependency on the output is removed from the connection stack. This also happens if trying to remove the @searchable annotation, as the update attempts to remove the DynamoDB stream before the dependency on it in the searchable stack is removed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be possible to remove @connection and @searchable (or to completely delete a GQL type that has these annotations).
Additional context
Example CF error (resolver in Connection stack requires data source from GQL Type stack):
UPDATE_FAILED PreviewImage AWS::CloudFormation::Stack Thu May 09 2019 14:33:20 GMT+0100 (British Summer Time) Embedded stack xxxxxx was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: Export xxxx:GetAtt:PreviewImageDataSource:Name cannot be deleted as it is in use by xxxx-ConnectionStack-xxxxx
There are 2 PR opens to handle the 2 scenarios, #1182 for removing @connection and #1140 for removing @searchable.
the fixes by @kstro21 has been merged and would be published in the next release - 1.6.10.
Most helpful comment
There are 2 PR opens to handle the 2 scenarios, #1182 for removing @connection and #1140 for removing @searchable.