Skip to content

Instantly share code, notes, and snippets.

@fwojciec
Created January 20, 2020 16:00
Show Gist options
  • Save fwojciec/9bdc41270e38d9929e6327e30b4bd704 to your computer and use it in GitHub Desktop.
Save fwojciec/9bdc41270e38d9929e6327e30b4bd704 to your computer and use it in GitHub Desktop.
gqlserver2: dataloaders5
// NewHandler returns a new graphql endpoint handler.
func NewHandler(repo pg.Repository, dl dataloaders.Retriever) http.Handler {
return handler.GraphQL(NewExecutableSchema(Config{
Resolvers: &Resolver{
Repository: repo,
DataLoaders: dl,
},
}))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment