P
Prisma•5mo ago
tort6334

Any expected SDL-First generator with CRUD abilities?

Hi guys, I really like Prisma and I want to use it with GraphQL, the thing is, I want to generate automatically all CRUD operations based on my schema, and the only valid option right now is to use TypeGraphQL, and I prefer to use Schema First language, will there be a generator for that?
8 Replies
Nurul
Nurul•5mo ago
Nexus Schema
Overview
Overview
tort6334
tort6334•5mo ago
@Nurul (Prisma) Yeah nexus haven't been updated for 1 year (https://github.com/graphql-nexus/nexus/commits/main/), it seems like the most popular graphql tool is graphql-tools, which according to the following link is not intergrated with prisma: https://www.prisma.io/docs/orm/overview/prisma-in-your-stack/graphql The question is if there are plans to make a plugin for SDL as well.
Ryan Quinn
Ryan Quinn•5mo ago
RedwoodJS will generate your basic create, findFirst, findAll, delete, update for a given prisma schema in a cli utility called "scaffolds": https://redwoodjs.com/docs/tutorial/chapter2/getting-dynamic
Getting Dynamic | RedwoodJS Docs
These two pages are great and all but where are the actual blog posts in this blog? Let's work on those next.
tort6334
tort6334•5mo ago
Thanks @Ryan Quinn , so if I get it right, I don't have to use redwoodjs stack, and i get install their dependency as dev or even use npx and just use their scaffolds? I'll read more about it! 🙂 Does it create SDLs?
Ryan Quinn
Ryan Quinn•5mo ago
You’d be using redwood as your framework at that point but it’s probably the easiest way to get GraphQL setup. You define your prisma model and the scaffolds will make your service, the sdl, as well as pages for you to view and edit the data sort of like prisma studio on the front end.
tort6334
tort6334•5mo ago
@Ryan Quinn this is not a very popular framework and I afraid that they will stop maintain it, I prefer to use not opinioned framework, do I have other options?
Ryan Quinn
Ryan Quinn•5mo ago
It has years of runway via funding from a cofounder of GitHub. The unpopular parts are mostly the GraphQL tie ins as server components can dissolve a lot of the need for it and ppl have generally disliked learning more tertiary languages to get up and running Then it’s ppl wanting to use some other render modes like SSR. If you want to keep the GraphQL part I’m not sure where to go.
tort6334
tort6334•5mo ago
Thanks Ryan for the input, i wish there was a pure unopinioned graphql sdl (graphql-tools) generator, rather than forcing to use migration to a nitche whole framework i'll try to ask at Redwoojs if it's possible to only use their crud generator, that might be a good solution
Want results from more Discord servers?
Add your server