update server boilerplate to use graphql

This commit is contained in:
Lakhan Samani
2021-07-08 17:45:19 +05:30
parent 758f8298db
commit 8cff689f22
13 changed files with 3006 additions and 64 deletions

View File

@@ -0,0 +1,28 @@
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Todo {
id: ID!
text: String!
done: Boolean!
user: User!
}
type User {
id: ID!
name: String!
}
type Query {
todos: [Todo!]!
}
input NewTodo {
text: String!
userId: String!
}
type Mutation {
createTodo(input: NewTodo!): Todo!
}