Closed electronicalias closed 2 months ago
I managed to solve it by using this workaround, but... janky!
if (!resources.api || !resources.api.GraphQLAPI) {
throw new Error('rootstack is undefined. Please check the structure of the resources object.');
}
const rootStack = resources.api.GraphQLAPI?.stack;
new cdk.CfnOutput(rootStack, 'someRealtimeApiId', {
value: graphqlApiId,
description: 'someRealtimeApiId',
});
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Is this feature request related to a new or existing Amplify category?
api
Is this related to another service?
No response
Describe the feature you'd like to request
All other supported overrides allow for the
resources.addCfnOutput method
. Whereas with graphql apis it does not.Describe the solution you'd like
When overriding the graphql api, I should be able to do the following:
Describe alternatives you've considered
No idea if this is the right terminology but I've tried to type cast things like .node, .rootStack etc, but can't find a way to natively create a cfnOutput etc.
Additional context
No response
Is this something that you'd be interested in working on?
Would this feature include a breaking change?