Skip to content

Commit

Permalink
feat(go): generate query grpc clients
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Jun 24, 2024
1 parent ba6e2ee commit 1d4165a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions magefiles/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ func (Build) Go(schema string) error {
return fmt.Errorf("failed to generate go types: %w", err)
}

fmt.Println("👨‍💻 Generate go client")
err = sh.Run("go-codegen", "generate",
"query-client",
filepath.Join(SCHEMA_DIR, fmt.Sprintf("%s.json", schema)),
"-o", filepath.Join(dest, "client.go"),
"--package-name", "schema")
if err != nil {
return fmt.Errorf("failed to generate go client: %w", err)
}

fmt.Println("🔨 Building go")
return runInPath(dest, "go", "build")
}

0 comments on commit 1d4165a

Please sign in to comment.