Skip to content

panter/ra-data-prisma

Repository files navigation

ra-data-prisma

Packages to connect react-admin 🧩 with prisma version 2 🌈

  • dataprovider: the dataprovider for the frontend
  • backend: tools to help making a nexus-prisma backend compatible with the data-provider

Usage

you need to add the dataprovider to your react-admin app. Your backend needs additional resolver for all the resoures you gonna need. backend package will help you with making your backend compatible with the dataprovider!

See the readmes above for further information.

Develop

call yarn install to set it up.

yarn test to run unit tests.

Some tests use an actual introspection result from a nexus-prisma backend. If you want to extend the underlying model do:

  • edit datamodel.prisma to alter the underlying prisma model
  • edit testSchemaNexus.ts to modify the nexus types
  • call yarn install in the root to update all types and the test introspection schema

Prior work

loosly based on https://github.com/Weakky/ra-data-opencrud, thanks @Weakky