Guy Shechter
02/14/2022, 7:25 AMimport { GraphqlApi } from "@aws-cdk/aws-appsync-alpha";
const api = new AppSyncApi(this, "GraphqlApi", {
graphqlApi: GraphqlApi.fromGraphqlApiAttributes(this, "IGraphqlApi", {
graphqlApiId,
}),
});
However, if i then try to add a unit resolver where i reference a datasource I added in the first stack it fails; also, if i try to lookup the datasource by name
api.getDataSource('mydsName');
it also returns undefined. Any thoughts?thdxr
02/14/2022, 2:09 PMDerek Kershner
02/14/2022, 5:57 PMconst api = GraphqlApi.fromGraphqlApiAttributes(this, "IGraphqlApi", {
graphqlApiId,
});
Guy Shechter
02/14/2022, 5:59 PMthdxr
02/14/2022, 6:01 PMGuy Shechter
02/14/2022, 6:06 PMthdxr
02/14/2022, 6:07 PMthdxr
02/14/2022, 6:07 PMFrank
mydsName
is not created in this AppSyncApi
construct right?Frank
graphqlApi
, we can make the construct also allow u to import some data sources… but then I don’t think CDK allows u to import data sources 🤔Frank
Guy Shechter
02/17/2022, 10:26 PMFrank
Guy Shechter
02/17/2022, 10:32 PMFrank