type User {
id: ID!
name: String!
email: String!
posts: [Post!]!
}
type Post {
id: ID!
title: String!
content: String!
author: User!
}
input PostInput {
title: String!
content: String!
authorId: ID!
}
type Query {
user(id: ID!): User
posts: [Post!]!
}
type Mutation {
createPost(input: PostInput!): Post
}