This API uses multiple authorization modes (configured per field/type):
type Mutation createPost(input: CreatePostInput!): Post updatePost(id: ID!, input: UpdatePostInput!): Post deletePost(id: ID!): Boolean
type Post @model id: ID! title: String! content: String! author: String! createdAt: AWSDateTime! updatedAt: AWSDateTime!
Example directive usage:
type Query getPost(id: ID!): Post listPosts(limit: Int, nextToken: String): PostConnection!
serverless deploy --stage dev
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:
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.