Repo - Appsync
type Subscription onPostCreated: Post @aws_subscribe(mutations: ["createPost"])
type Query publicFeed: [Post] @aws_api_key appsync repo
Example directive usage:
This API uses multiple authorization modes (configured per field/type): appsync repo
serverless deploy --stage dev
type Post @model id: ID! title: String! content: String! author: String! createdAt: AWSDateTime! updatedAt: AWSDateTime! appsync repo
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: