Created
December 10, 2021 04:43
-
-
Save manakuro/20688f0778002886f01b4abf80260404 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
// Resolver is a context struct | |
type Resolver struct { | |
client *ent.Client | |
controller controller.Controller | |
} | |
// NewSchema creates NewExecutableSchema | |
func NewSchema(client *ent.Client, controller controller.Controller) graphql.ExecutableSchema { | |
return generated.NewExecutableSchema(generated.Config{ | |
Resolvers: &Resolver{ | |
client: client, | |
controller: controller, | |
}, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment