Created
November 5, 2021 04:25
-
-
Save manakuro/aa35e703c66d1673c7352cf42ab84170 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 graph | |
| import ( | |
| "golang-ent-gqlgen-example/ent" | |
| "golang-ent-gqlgen-example/graph/generated" | |
| "github.com/99designs/gqlgen/graphql" | |
| ) | |
| type Resolver struct{ client *ent.Client } | |
| func NewSchema(client *ent.Client) graphql.ExecutableSchema { | |
| return generated.NewExecutableSchema(generated.Config{ | |
| Resolvers: &Resolver{client}, | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment