Not super facile with typescript, I am trying to develop two simple cdk stacks, one with an graphql api and the other with the database to be used by it.
If I create an SSM parameter in the database stack and then access that same parameter in the second stack, how do I add the database to the api?
const latestDDB = ssm.StringParameter.valueForStringParameter(
this,
'/foodir/fooname'
);
const userDataSource = api.addDynamoDbDataSource(
'FooDataSource',
latestDDB <-- this causes an error, "Argument of type 'string' is not assignable to parameter of type 'ITable'.ts(2345) const latestDDB: string"
);
Thanks in advance.