Created
March 27, 2019 05:10
-
-
Save yai333/c8c3353e02b31c57facb024a2e7420ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input PostInput { | |
| title: String | |
| content: String | |
| notificationEmails: String | |
| createdAt: String | |
| } | |
| type Mutation { | |
| addPost(post: PostInput!): Post | |
| deletePost(id: Int!): Post | |
| } | |
| type Post { | |
| id: Int | |
| title: String | |
| datetime: String | |
| author: String | |
| content: String | |
| createdAt: String | |
| notificationEmails: String | |
| } | |
| type Query { | |
| getPosts(limit: Int, currentPage: Int, nextPage: Int): [Post] | |
| } | |
| type Subscription { | |
| onPostAdded: Post @aws_subscribe(mutations: ["addPost"]) | |
| onPostDeleted: Post @aws_subscribe(mutations: ["deletePost"]) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment