Add getRequests query to GraphQL server

This commit is contained in:
David Stotijn
2020-02-23 22:07:46 +01:00
parent ef96a69baa
commit 400436607c
10 changed files with 523 additions and 865 deletions

View File

@ -1,28 +1,17 @@
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Todo {
id: ID!
text: String!
done: Boolean!
user: User!
type Request {
url: String!
method: HttpMethod!
timestamp: Time!
}
type User {
id: ID!
name: String!
}
type Query {
todos: [Todo!]!
getRequests: [Request!]!
}
input NewTodo {
text: String!
userId: String!
enum HttpMethod {
GET
POST
}
type Mutation {
createTodo(input: NewTodo!): Todo!
}
scalar Time