-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: Create Resources with Prisma #45
base: main
Are you sure you want to change the base?
Conversation
</CustomRoutes> | ||
<> | ||
{models.map( | ||
(table) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(table) => | |
(model) => |
|
||
const ReactAdmin = () => { | ||
const { data: session, status } = useSession(); | ||
const tables = Object.keys(Prisma.ModelName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is Prisma
a class?
@@ -0,0 +1,3 @@ | |||
import { Prisma } from "@prisma/client"; | |||
|
|||
export const tables = Object.keys(Prisma.ModelName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const tables = Object.keys(Prisma.ModelName); | |
export const models = Object.keys(Prisma.ModelName); |
async (req: NextApiRequest, res: NextApiResponse, auth) => { | ||
const tables = Object.keys(Prisma.ModelName); | ||
const dmmf = await getDMMF({ | ||
datamodel: `// This is your Prisma schema file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the schema as text lives somewhere in the client (prismaClient) super sure I have seen it
No description provided.