Can someone explain how Prisma works with Remix?

Can someone explain how Prisma works with Remix?

no_robotocha
Shopify Partner
54 2 11

I'm new to Remix, I've built the example app: https://shopify.dev/docs/apps/build/build?framework=remix

 

Usually on an app I pay for a database service and connect to it - how does this Prisma one work in the test app? Is this available to all apps you build? Where is the data stored? Do you need a Prisma account?

 

I've looked for a guide to this but can't see anything in the docs except for what is in the remix app example above. 

 

I'm inclined to use Mongo or Supabase independently but would like to understand what this is first.

 

Thanks

--
No, Robotocha!
Reply 1 (1)

smahs
Shopify Partner
4 0 2
a database service and connect to it - how does this Prisma one work in the test app?

Prisma is an ORM which connects to a preexisting database and provides a glue layer for your app to query the data in an object oriented manner. You need a database to store tokens. However, by default, prisma is configured to create an sqlite database (you can find both the prisma model config and the created database in `$project_root/prisma` directory. If you change to any other database, edit the `$project_root/prisma/schema.prisma` file accordingly (there are doc links in the file for more info).

 

Do you need a Prisma account?

No. But you would need a production grade database setup.

 

Edit: prisma claims to work with both mongo and postgres (I have only tested with postgres), there are alternative connectors in the shopify-app-js repo.