Scaffold GraphQL server

This commit is contained in:
David Stotijn
2019-12-01 14:47:25 +01:00
parent 1164837247
commit ef96a69baa
8 changed files with 2986 additions and 4 deletions

28
pkg/api/schema.graphql Normal file
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!
}