[ANN] rescript-edgedb - Use EdgeDB with full type safety in ReScript

Happy to announce rescript-edgedb - use EdgeDB in ReScript, with full type safety!

This is what it looks like:
image

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

Wrapping up

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.

13 Likes

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)

1 Like

It seems like the team’s attempt to discourage ppx’es doesn’t help :grin: 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.

5 Likes

@zth Thx a lot for this amazing library, I plan to return to React (from SolidJs) in order to benefit from the new Rescript version (since it’s my favorite langage on the web), and I also use EdgeDB server side, can’t wait to test your lib :smiley:

2 Likes

There’s now a blog post (written by me) published on EdgeDB’s blog about the ReScript + EdgeDB integration and experience: ReScript and EdgeDB | EdgeDB Blog

9 Likes