Remix.run Logo
cluckindan 2 days ago

There is a pattern where GraphQL really shines: using a GraphQL native DB like Dgraph (self-hosting) and integrating other services via GraphQL Federation in a GraphQL BFF.

eatsyourtacos a day ago | parent [-]

Sounds like a great way to completely lock yourself into an ecosystem you'll never be able to leave!

cluckindan a day ago | parent [-]

On the contrary, you could swap the database rather easily compared to traditional REST+SQL backends.

Migrate data to another GraphQL DB and join its GraphQL schema to the supergraph. The only pain point could be DB-specific decorators, but even those could be implemented at the supergraph level (in the Federation server) if needed.

Even migrating to a non-GraphQL DB is feasible: you could just write your own resolvers in a separate GraphQL server and join that to the supergraph. But that would be more of a ecosystem lock already :)

Really, any manner of SQL database is more of an ecosystem lock than a GraphQL database behind Federation.