Tomek Poniatowicz
7/31/2020
Since its open-sourcing, GraphQL keeps on gaining popularity and is becoming used by more & more development teams. Why? What's its secret? It's simple, GraphQL makes describing the complex data dependencies easy and it can be usee with any programming language. The rising popularity created a demand for different tools and libraries facilitating GraphQL implementation & usage across different technologies and vice-versa. Sqlmancer is one of them.
Sqlmancer is a Node.js library simplifying GraphQL integration with SQL by translating GraphQL queries into SQL statements in a smart way. The flexibility offered by Sqlmancer allows you to create the queries and mutations that suit your schema as well as leaving the decisions to you what types you want to expose in your schema by offering a number of convenient directives. The last but not least, Sqlmancer put annotation over transformation using directives mostly to annotate your schema rather than changing its behavior, aiming to be as aspect-oriented as possible.
Some of the notable features of Sqlmancer:
Sqlmancer generates a type-safe database client basing on your GraphQL schema and metadata provided through a set of schema directives, giving you the ability to query your server for complex data structures with a single SQL query:
while keeping your resolver as simple as possible:
Cool, right? If you are interested in for a detailed guide on how to work with the library make sure to visit official Sqlmancer documentation
Sqlmancer is still in development. The API is still subject to changes so be aware that there might be some breaking changes coming anytime. As mentioned by the creator feedback and suggestions from the community are more than welcome so if you find a bug, have a feature request, or just want to contribute to this awesome project, feel free to an open issue.