1

We want to create one GraphQL schema using EF Core and Hotchocolate. Our data is in several databases two Azure SQL and one PostgresQL. In the first DB we have descriptive data and in other two real-time pricing data from different data vendors. We need to have one schema where we have a combination of descriptive and pricing information from several data vendors.

What is the best way to configure Hotchocolate server with EF core to get data from those DBs into one schema? It's not a problem to create several schemas but what is the optimal way to have only one without stiching?

George
  • 11
  • 2

1 Answers1

0

Maybe something like this?: https://dejanstojanovic.net/aspnet/2020/november/accessing-multiple-databases-from-the-same-dbcontext-in-ef-core/

And then using DbContext in HotChocolate: https://chillicream.com/docs/hotchocolate/v12/integrations/entity-framework

There is also GraphQL Federation which might be overkill for your scenario, I would view it as more of an enterprise thing. But it´s worth checking out: https://www.apollographql.com/docs/federation/#:~:text=Apollo%20Federation%20is%20a%20powerful,subgraph

Viktor
  • 679
  • 6
  • 21