Last active
July 16, 2019 16:36
-
-
Save bickyeric/ef55c7350ae7603f334a8a4b90c24b5d to your computer and use it in GitHub Desktop.
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
// query_resolver.go | |
package graph | |
import "context" | |
type queryResolver struct { | |
ComicByID *FindByID | |
ComicAll *SearchAll | |
} | |
func (r *queryResolver) Comic(ctx context.Context, id string) (*Comic, error) { | |
return r.ComicByID.Perform(ctx, id) | |
} | |
func (r *queryResolver) AllComics( | |
ctx context.Context, | |
skip *int, | |
limit *int) ([]*Comic, error) { | |
return r.ComicAll.Perform(ctx, skip, limit) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment