|
|
|
|
|
by linkdd
2301 days ago
|
|
You would never expose your database directly to the whole world. Either it is an internal service, only consumed by your own products, and then it's fine.
Or you have an API gateway to control who and how your services are queried. The API Gateway is your interface who should not break.
Your services communicating with your database (through Prisma, Hasura, any ORM, ...) can and will break. When you base your GraphQL schema on your database schema for your internal services, you get rid of one long and annoying step of putting glue everywhere. This is especially true in a microservice architecture, and even more in the corporate world where you are expected to produce code quickly. |
|