Skip to content

feat: add modusgraphgen code generator#1

Merged
mlwelles merged 1 commit intomainfrom
feature/add-modusgraphgen
Feb 27, 2026
Merged

feat: add modusgraphgen code generator#1
mlwelles merged 1 commit intomainfrom
feature/add-modusgraphgen

Conversation

@mlwelles
Copy link
Owner

Summary

  • Adds cmd/modusgraphgen/, a code generation tool that reads Go structs with json/dgraph tags and produces typed CRUD clients, query builders, auto-paging iterators, functional options, and a Kong CLI
  • Zero new dependencies -- the generator uses only the Go standard library
  • Self-contained tests with golden file regression testing
  • Adds "Code Generation" section to README

Mirror of PR opened to upstream (matthewmcneely#10). Merging here to use while awaiting upstream review.

Merge the standalone modusGraphGen code generator into the modusGraph
repository as cmd/modusgraphgen/. The tool parses Go structs with
json/dgraph tags and generates typed CRUD clients, query builders,
auto-paging iterators, functional options, and a Kong CLI.

Code is organized under cmd/modusgraphgen/internal/ with model, parser,
and generator packages. Test fixtures are self-contained in testdata/.

The generated code imports github.com/matthewmcneely/modusgraph and
requires no additional dependencies beyond the Go standard library.
@mlwelles mlwelles merged commit 7161c77 into main Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant