Created
November 5, 2021 04:24
-
-
Save manakuro/43998a8fbd4b381de4d39e8187e328ab 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
| // +build ignore | |
| package main | |
| import ( | |
| "errors" | |
| "log" | |
| "entgo.io/contrib/entgql" | |
| "entgo.io/ent/entc" | |
| "entgo.io/ent/entc/gen" | |
| ) | |
| func main() { | |
| ex, err := entgql.NewExtension() | |
| if !errors.Is(err, nil) { | |
| log.Fatalf("Error: failed creating entgql extension: %v", err) | |
| } | |
| if err := entc.Generate("./schema", &gen.Config{}, entc.Extensions(ex)); !errors.Is(err, nil) { | |
| log.Fatalf("Error: failed running ent codegen: %v", err) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment