by chatmasta · 2y ago · 0 comments
I recognize a lot of the problems described here in the docs (the "How Grats Works" [1] page is a good read). I could see this library fulfilling a similar role to Strawberry, for a backend written in TypeScript rather than Python.
Overall, it looks like a compelling implementation of some good ideas from the author, who incidentally is on the Relay team at Facebook, so he's probably done a lot of thinking in this problem space. Next time I'm working on a project with a TypeScript backend, I'll definitely take a look at this.
[0] https://www.splitgraph.com/blog/graphql-schema-stitching
https://x.com/captbaritone/status/1748020699263045659?s=46
Example project with this setup working can be found here: https://github.com/captbaritone/grats-relay-example
We actually started with Postgraphile, but found it was too much magic and eventually moved to defining resolvers explicitly with Strawberry for each service (which was much easier to do once we added the stitching layer).