Created
July 14, 2019 17:44
-
-
Save cmelgarejo/3b8a02702db2a5beabfbdc09b461a2dd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package resolvers | |
| import ( | |
| "github.com/cmelgarejo/go-gql-server/internal/gql" | |
| ) | |
| // Resolver is a modifable struct that can be used to pass on properties used | |
| // in the resolvers, such as DB access | |
| type Resolver struct{} | |
| // Mutation exposes mutation methods | |
| func (r *Resolver) Mutation() gql.MutationResolver { | |
| return &mutationResolver{r} | |
| } | |
| // Query exposes query methods | |
| func (r *Resolver) Query() gql.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