A simple types.gql
to define basic content types...
type Post @options("where", "limit", "order") {
title: String!
content: String
}
The resulting schema...
type Post {
id: ID!
title: String!
content: String
}
type Posts {
posts: [Post],
count: Int
}
input postInput {
title: String!
content: String
}
type Query {
post(id: ID!): Post
posts(where: {}, order: {}, limit: {}): Posts
}
type Mutation {
createPost(post: postInput): Post
deletePost(postId: ID!): Post
updatePost(postId: ID!, postInput): Post
}