So my problem is more like the following <@UBSLXKQ...
# orm-help
a
So my problem is more like the following @Michaël . I have a gateway that has its own db with prisma in between. I use that gateway to communicate everything from the front end to the microservices. Each microservices has its own
db
with
prisma
in between. I want to be able to make a query for example from the front end, pass it through the gateway and hit the microservice. The main purpose of this gateway is to gran permissions as the calls go down to the microservice. My current dilemma involves me not being able to properly formate(or tell) my gateway what to send to the microservice
m
@aroman that sounds complicated and beyong my current understanding of Prisma, I’m sorry I cannot help you. Good luck
a
All good I’ve been re-reading your post over and over and maybe there is an answer there for me. I’ll try it out
@Michaël Just a question about that. Did you just use a the
YAML
file or did you also add the
graphql-tools
to
index.ts
m
I just used the YAML file
a
How would I approach the YAML sources for the other dbs if they in another repo. From what I can understand your example is basically for a monorepo
m
https://github.com/prismagraphql/prisma/issues/2792 @aroman I wrote up a suggestion for your issue. Please feel free to elaborate and collaborate 😉
a
Awesome! I will thanks man 🙂
m
I have no solution for your microservices with each their own db. I would think not to share the Prisma YAML file?
a
I’m trying to grasp schema stitching. This would solve a lot of our problems. Having one central schema. Currently we have to basically duplicate in each server the schemas and resolvers.
Copy code
datamodel: datamodel.graphql

endpoint: .....

secret: ${env:PRISMA_SECRET}

hooks:
  post-deploy:
    - graphql get-schema --project database
    - graphql codegen
    - echo "Deployment finished"
m
for your shared schemas, maybe you can use a git submodule or a shared npm package? Copy/paste is never ok 😄
a
I agree 😄 any suggestions for a shared npm package? I was looking into this one: https://www.npmjs.com/package/graphql-gateway-tools
m
At first glance, that looks like a good solution for your case
a
One of my concerns is how it deals with the imported types from the generated files… I guess I’ll find out by trying it out 😂
👍 1
🙂 1