Hi Prisma, I've been involved in a project recentl...
# orm-help
i
Hi Prisma, I've been involved in a project recently that is using Hasura and it blew my mind on how all the graphql queries, mutations, subscriptions and filters are automatically created just by inspecting the database. Prisma has been my favorite ORM for a while and I'm wondering if there's any library or utility in Prisma environment or something close we can use to replicate the features on Hasura Thanks
n
Hey Ibrahim šŸ‘‹ there are several libraries that also generate a GraphQL API from a Prisma schema and therefore would provide a very similar experience to Hasura. Depending on which ā€œschema buildingā€ approach you use (e.g. SDL-first or code-first with TypeGraphQL, Nexus, Pothos), there are different libraries available: • for TypeGraphQL: https://typegraphql.com/docs/prisma.html (tutorial: https://dev.to/prisma/prototyping-a-crud-api-with-typegraphql-and-prisma-for-your-database-424c) • Pal.js (for SDL-first & Nexus): https://paljs.com/generator/ • for Nexus: https://github.com/prisma/nexus-prisma • for Pothos: https://pothos-graphql.dev/docs/plugins/prisma Note that afaik the plugins for Nexus and Pothos currently only generate GraphQL types based on Prisma models but don’t actually generate CRUD API operations (i.e. query and mutation resolvers).
šŸ‘ 1
šŸ™Œ 1
i
@nikolasburk thanks for sharing this ! I definitely will give this a try
šŸ’Æ 1
n
Glad I could help! Let me know how it goes btw, I’m really curious to learn more about your experience (both good and bad šŸ˜„)