Skip to content

Instantly share code, notes, and snippets.

@kilonzi
Last active May 20, 2020 05:48
Show Gist options
  • Save kilonzi/ba6726d1def15ee3b84bf05f132e186f to your computer and use it in GitHub Desktop.
Save kilonzi/ba6726d1def15ee3b84bf05f132e186f to your computer and use it in GitHub Desktop.
A GraphQL schema autogenerate by https://www.skimaql.com
type User {
id: ID!
posts: [Post]
name: String
email: String!
password: String!
}
type Post {
id: ID!
user: User
message: String!
createdAt: String!
retweets: Int
}
input UserInput {
id: ID!
posts: PostInput
name: String
email: String!
password: String!
}
input PostInput {
id: ID!
user: UserInput
message: String!
createdAt: String!
retweets: Int
}
type Query {
getAllUsers: [User!]
getOneUserByID(id: ID!): User
filterUsers(
id: ID
posts: PostInput
name: String
email: String
password: String
): [User!]
getAllPosts: [Post!]
getOnePostByID(id: ID!): Post
filterPosts(
id: ID
user: UserInput
message: String
createdAt: String
retweets: Int
): [Post!]
}
type Mutation {
createUser(input: UserInput): User
updateUser(
id: ID
posts: PostInput
name: String
email: String
password: String
): User
deleteUser(id: ID!): User
createPost(input: PostInput): Post
updatePost(
id: ID
user: UserInput
message: String
createdAt: String
retweets: Int
): Post
deletePost(id: ID!): Post
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment