Appsync Repo Today
type Subscription onPostCreated: Post @aws_subscribe(mutations: ["createPost"])
type Mutation createPost(input: CreatePostInput!): Post @aws_cognito_user_pools appsync repo
type Query getPost(id: ID!): Post listPosts(limit: Int, nextToken: String): PostConnection! 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: appsync repo
Example directive usage:
type Query publicFeed: [Post] @aws_api_key