type Post { id: ID! createdAt: Time! updatedAt: Time! title: String! author: User content: String! } input CreatePostInput { title: String! content: String! } input UpdatePostInput { title: String! content: String! } extend type Query { posts: [Post!]! post(id: ID!): Post } # @admin is only the first half of the rule for updatePost and deletePost: # the resolver also requires the caller to be the post's author. extend type Mutation { createPost(input: CreatePostInput!): Post! @admin updatePost(id: ID!, input: UpdatePostInput!): Post! @admin deletePost(id: ID!): Post! @admin }