Created
March 7, 2020 18:18
-
-
Save vniche/2a8ce4fd81210216b5dd56da09570afc to your computer and use it in GitHub Desktop.
Handling not implemented as a GraphQL error in gqlgen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES. | |
package graph | |
import ( | |
"context" | |
"fmt" | |
) | |
type Resolver struct{} | |
func (r *mutationResolver) Signup(ctx context.Context, input NewUser) (string, error) { | |
return "", fmt.Errorf("not implemented") | |
} | |
func (r *queryResolver) User(ctx context.Context, id string) (*User, error) { | |
return nil, fmt.Errorf("not implemented") | |
} | |
func (r *queryResolver) Users(ctx context.Context) ([]*User, error) { | |
var results []*User | |
return results, fmt.Errorf("not implemented") | |
} | |
func (r *Resolver) Mutation() MutationResolver { return &mutationResolver{r} } | |
func (r *Resolver) Query() QueryResolver { return &queryResolver{r} } | |
type mutationResolver struct{ *Resolver } | |
type queryResolver struct{ *Resolver } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment