One feedback - if you are truly comparing with "other" tools - you should be looking at grpc and protoc plugins. I have used to great effect for things like:
1. Generating wasm bindings for grpc services
2. Generating "data access layer" types so you can choose how a api proto is transformed to a data domain type and vice versa
3. MCP bindings for APIs
4. GraphQL/BFF bindings with multiple services
5. All of the above "across" langauges.
The tooling is fantastic and extensible - if you are ok to start with a proto view of your world - it sounds wierd and like an N+1 problem but once you are used to it it is surprisingly fun (ok we may have different ideas of fun)
This project admittedly was developed to solve a specific need in an existing codebase with a lot existing types.
The codebase is also mostly maintain by the backend Golang engineers. Letting them use their native type system increases adoption and buy in.
Yes, if you design your graph to allow something like `tags -> relatedTags -> relatedTags` ad infinitum you can let your clients build a performance problem. So why not have just a top-level `getRelatedTags(tagName)` query? Or a `getRelatedArticles(articleId)` query? Just because you can have things nested doesn't mean you need to have all the things nested.
The bulk of our REST API is backed by some Rails gem, which allows for a `fields` param. Those `fields` can be deep. As in you could write `getComments?id=1234fields=user.orders`, but do you know what we do? Don't expose `orders` as a field on `User`.
Why not use Open API then?
- graphql solves a lot of other problems when querying microservices
- graphql gives us PR-level alerts on whether any schema changes are safe
- graphql actually manages our front-end query caching / updating quite nicely
My comment about protos was just the spec (and was seperating the binary formats as a different concern). But your concerns are pretty valid.
It basically lets you generate typescript types from your Go types. However, it's very customizable - you can post-process the AST. In our case, we have a custom generic Go type that indicates an optional (not nullable) field, and we can easily translate it to optional TS types (e.g. for sparse updates).
All in all, great tool/library, thanks for building it!
Disclaimer: I know a developer at Coder (not the author), who also recommended me guts back then, but am unaffiliated other than that.
The theory when we came out with guts was that Golang's typing system is very simple (this was before generics when it was made). So how hard could it be to write a simple converter?
The first iteration of guts was written in an afternoon. Eventually I moved it to its own repo, mainly for personal use.
So honestly it really comes down to making it as easy as possible to write backend code. Using another spec that autogen's the Golang would be an extra step we did not feel we needed.
No need to. You can start with Go Lang server and generate the spec from it as well.
Here are the advantages of this approach compared to using guts lib: - I get validation with clear error messages. - It supports many languages out of the box. - I don’t need to maintain a custom library. - JSON Schema is well supported in LLMs (for example, with structured output or vibe coding).
The reason to keep Golang as the source of truth is these types originate from the backend. So when you are writing the backend, it is just the easiest place to write and maintain things. No obstacles.
Golang types are also very simple. I imagine almost all Go types can be converted because of that.
Somewhat related is a project we worked on within Golang community in Malawi: https://github.com/golang-malawi/geneveev
It supports converting types to Zod schemas and Dart classes. Never got around to TypeScript and would be cool to see if we could add support for guts
I don't know if I would go that far, but I kind of find the idea interesting; if everything can be encoded and decoded identically, then the choice of language stops mattering so much.
Which is used for example in the Go GUI framwork Wails: https://github.com/wailsapp/wails/tree/v2.11.0/v2/internal/b...
(Shoutout to Guido!)