mirror of
https://github.com/dstotijn/hetty.git
synced 2025-07-01 18:47:29 -04:00
Scaffold GraphQL server
This commit is contained in:
26
pkg/api/resolver.go
Normal file
26
pkg/api/resolver.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user