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

26
pkg/api/resolver.go Normal file
View File

@ -0,0 +1,26 @@
package api
import (
"context"
) // THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES.
type Resolver struct{}
func (r *Resolver) Mutation() MutationResolver {
return &mutationResolver{r}
}
func (r *Resolver) Query() QueryResolver {
return &queryResolver{r}
}
type mutationResolver struct{ *Resolver }
func (r *mutationResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo, error) {
panic("not implemented")
}
type queryResolver struct{ *Resolver }
func (r *queryResolver) Todos(ctx context.Context) ([]*Todo, error) {
panic("not implemented")
}