Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created November 5, 2021 04:25
Show Gist options
  • Select an option

  • Save manakuro/aa35e703c66d1673c7352cf42ab84170 to your computer and use it in GitHub Desktop.

Select an option

Save manakuro/aa35e703c66d1673c7352cf42ab84170 to your computer and use it in GitHub Desktop.
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