I’m trying to figure out how best to separate the database layer from my GraphQL server(s).
The idea is that I want to have 2 clusters in Prisma Cloud (one for dev and staging, and one for production) these two clusters should only contain the database layer abstraction that Prisma provides (so the ./database folder containing
Then I have 2 application layer GraphQL servers that will be served from Heroku, and they all need to be able to talk to the same Prisma Cloud endpoint.
Where stuff starts to confuse me, is in terms of how I would gain access from my GraphQL servers to the
prisma.graphql file that is generated doing
$ prisma deploy, so that I can import the types I need into each of the servers
I guess I could just copy paste
prisma.graphl into a folder on each server, and then import from there, but that would require me to update it on every single server every time I make changes to my datamodel which does not seem sufficient.
What would be the correct way to handle this separation?
Note: I’m currently working out from the node.js advanced boilerplate where database and application layer lives in the same project.