Re:GraphJin – GraphQL to SQL Compiler
by mirekrusin on Thursday June 02, 2022 @01:06AM
(#31591543)
We use not so much frameworks but combination of lightweight libraries:
- runtime assertions [0] - to map unknown values at i/o boundary into statically typed code (rpc input parameters, sql results etc)
- template based sql combinators to sanitize sql/generate sql [1]
- jsonrpc over websockets - for bidirectional comms between f/e and b/e
It works very well for us for hundreds of rpcs - it's easy to manage things like permissioning/narrowing visibility and other aspects you need in business/enterprise-like setting ie. performance monitoring is very easy/straight forward.
We build Taxi (https://taxilang.org), which is the type system for APIs, and then Vyne (https://vyne.co) which uses that types to automate all the plumbing.
It's pretty close to what's being described here, and removes the boilerplate in API orchestration.
[1]: https://fastapi.tiangolo.com/