Happy to announce
rescript-edgedb - use EdgeDB in ReScript, with full type safety!
This is what it looks like:
Read more in the repository: GitHub - zth/rescript-edgedb: Use EdgeDB fully type safe in ReScript. Embed EdgeQL right in your ReScript source code.
Preventing overfetching is built in
The CLI for
rescript-edgedb also ships with a command to detect unused selections in any of your EdgeQL queries in your app (powered by
reanalyze by @cristianoc ). It essentially eliminates the chance of overfetching making it into production, and makes it simple to keep a clean code base where nothing’s pulled out of the database that’s not also actually used.
It looks like this:
Presenting ReScript at the EdgeDB developer days
ReScript will hopefully get some nice press as well, as I’m going to be presenting
rescript-edgedb on EdgeDB’s launch day for their version 4.0: EdgeDB Developer Day | EdgeDB
Anyway, looking forward to your feedback! I hope this is going to enable more exploration of using ReScript on the backend. I’m personally very bullish on EdgeDB for many reasons, and will look to use it extensively going forward.
Looks really interesting , thanks for sharing. Do you use this with your other library, resgraph? Interested to know what you typically use on the backend with rescript?
(I’m not as familiar with graphql so my knowledge is lacking a bit in this area)
It seems like the team’s attempt to discourage ppx’es doesn’t help There’s still a lot of cases for embedding DSLs in res files, because that’s the only way to make things typesafe, I guess. And you can go without type safety when writing styles, but it’s sort of important when it comes to data.
Which makes me wonder whether we can expect some ppx-related optimisations at some point.
Anyway, great work! Haven’t run into EdgeDB before, but it looks extremely intriguing.