Created
January 20, 2020 16:00
-
-
Save fwojciec/9bdc41270e38d9929e6327e30b4bd704 to your computer and use it in GitHub Desktop.
gqlserver2: dataloaders5
This file contains 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
// 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