Should you use PostgreSQL or MySQL for your next project? Are you moving cloud providers and don't have both options available? Maybe you'd

Polyglot persistence for PostgreSQL & MySQL using GraphQL & TypeScript

submited by
Style Pass
2021-06-11 10:30:04

Should you use PostgreSQL or MySQL for your next project? Are you moving cloud providers and don't have both options available? Maybe you'd like to start with one option and be able to make the switch later on. Why decide now when you can have both options without any tradeoffs?

Adding a layer of abstraction, a GraphQL API, allows you to swap database engines without having to change any UI or business logic related code.

WunderGraph allows you to introspect different DataSources and turn them into a single GraphQL API. We've started out with support for GraphQL & REST (OpenAPI), then added Apollo Federation (including subscriptions). Recently, we've added support for PostgreSQL. Today we're adding MySQL to the list, allowing for a polyglot persistence layer. There's more to come but let's focus on the two database engines for now.

If you look closely, you'll see that there are minor differences in the database schema due to the way each database works, but in general all tables and fields match another to make them compatible.

Leave a Comment