Hello prisma people :slightly_smiling_face: I am j...
# random
m
Hello prisma people 🙂 I am just getting started with Prisma and I would like to thank all the people that got involved into getting this wonderful project out there!!! You rock! Since I am just getting started I have 2-3 trivial questions (if this is the wrong place please point me to the right direction, thank you) 1. Can I have the prisma server connect to a MongoDB for e.g. without using a docker image? 2. Can I create using the same model definitions (etc) 2 implementations? One that will expose a REST api and one a GraphQL for Apollo Client ? 3. Is there a way to integrate auth. at the user level out of the box ? I hope this is are not to stupid questions. Thank you
d
Welcome 🙂 1) I don't really understand the question. Do you want Mongo do be not in a Docker image, or Prisma, or...? 2) I this is probably possible with a server like GraphQL Yoga or Apollo interfacing with Prisma, but not with Prisma directly. 3) I assume you refer to Prisma having user auth? It doesn't, that is also handled by a fontend server.
m
Thank you 1. I think I got my answer from the node/rest example where it has makePrismaClientClass, basically that's what I need because my data layer it's going to be a managed MongoDB hosted by MongoDb themselves 2. I thought so, but I wanted to ask. Because I would like to create one entry point for my app that it's going to use Apollo Client and the REST for 3rd party integrations.
d
Regarding 2), I think there are resources that showcase how you can expose a GraphQL API and a REST API side by side with Yoga. IIRC it's fairly easy
m
wow, that would be awesome, could you please share some of this resources if that's not to much to ask
d
The most recent stuff a colleague pointed me towards is basically this: https://www.prisma.io/docs/get-started/03-build-graphql-servers-with-prisma-JAVASCRIPT-e001/. You'd simply combine the graphql and rest parts of the tutorial.
m
thank you very much!