Skip to main content

Instantialize AppSync

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

stacks/MyStack.ts
import { StackContext, AppSyncApi } from "@serverless-stack/resources";

export function MyStack({ stack }: StackContext) {
const api = new AppSyncApi(stack, "api", {
schema: "graphql/index.graphql"
});
stack.addOutputs({
GraphQlApiEndpoint: api.url,
});
}