Skip to main content

Instantialize AppSync

It's time to create an AppSync CDK/SST construct, if not yet created.

stacks/MyStack.ts
import * as sst from "@serverless-stack/resources";

export default class MyStack extends sst.Stack {
constructor(scope: sst.App, id: string, props: sst.StackProps) {
super(scope, id, props);

const api = new sst.AppSyncApi(this, "api", {
graphqlApi: { schema: "graphql/index.graphql" }
});
}
}