Appsync Repo [WORKING]

type Mutation createPost(input: CreatePostInput!): Post updatePost(id: ID!, input: UpdatePostInput!): Post deletePost(id: ID!): Boolean

| Mode | Use Case | |------|----------| | | Authenticated user operations | | API Key | Public, read-only access (expires) | | IAM | Service-to-service calls (EC2, Lambda) |

amplify init amplify push # Run GraphQL codegen (types, operations) npm run codegen Start local AppSync emulator (using Amplify Mock) amplify mock api Run unit tests for resolvers npm test GraphQL Schema The schema is defined in schema.graphql . Example: appsync repo

type Subscription onPostCreated: Post @aws_subscribe(mutations: ["createPost"])

serverless deploy --stage dev

cd infra npm run cdk deploy

type Mutation createPost(input: CreatePostInput!): Post @aws_cognito_user_pools type Mutation createPost(input: CreatePostInput

type Post @model id: ID! title: String! content: String! author: String! createdAt: AWSDateTime! updatedAt: AWSDateTime!