GraphQL API built with AWS AppSync, providing real-time and offline-capable data synchronization. This repository contains the GraphQL schema, resolvers, data sources, and infrastructure-as-code for the [Project Name] GraphQL API. The API leverages AWS AppSync for managed GraphQL, DynamoDB for primary data storage, and Lambda for custom business logic.

type Query getPost(id: ID!): Post listPosts(limit: Int, nextToken: String): PostConnection!

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:

This API uses multiple authorization modes (configured per field/type):

Example directive usage:

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

cd infra npm run cdk deploy