Thursday, January 21, 2021

Data layer development via ORM and API Gateway

Not sure what pushed me to this direction but search "DB with graphql" lead to - a tool for auto-generation GraphQL endpoints for DB schemas without programming. Open Surce, Apache 2 licence, MySQL/PostgreSQL capable.

Prisma is a next-generation ORM that can be used to build GraphQL servers, REST APIs, microservices & more. (222 kB)

For me DB-first approach is essential . The schema change is reflected in code just by re-generating code by CLI, no coding involved. Of course the discipline of migration for DB schema itself is still in place.

And last peace of back-end puzzle: ORM integration with API gateway( will serve security, authentication, licensing, analytics ) : Prisma + Apollo

The generated classes out of DB schema could(and should) be reused as on back-end as in front-end code via versioned (npm?) package.