Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Can someone explain how Prisma works with Remix?

Solved

Can someone explain how Prisma works with Remix?

no_robotocha
Shopify Partner
56 2 15

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!
Accepted Solution (1)

smahs
Shopify Partner
5 2 3

This is an accepted solution.

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.

View solution in original post

Reply 1 (1)

smahs
Shopify Partner
5 2 3

This is an accepted solution.

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.