Created
January 20, 2020 15:56
-
-
Save fwojciec/e0e8e53f6bc42bf454f85e9ac6e4afa8 to your computer and use it in GitHub Desktop.
gqlserver2: dataloaders1
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
package dataloaders | |
import ( | |
"context" | |
"github.com/[username]/gqlgen-sqlc-example/pg" // update the username | |
) | |
type contextKey string | |
const key = contextKey("dataloaders") | |
// Loaders holds references to the individual dataloaders. | |
type Loaders struct { | |
// individual loaders will be defined here | |
} | |
func newLoaders(ctx context.Context, repo pg.Repository) *Loaders { | |
return &Loaders{ | |
// individual loaders will be initialized here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment