language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

[Request] Show help/intellisense of models while doing CRUD operations in VS Code

Open LB22 opened this issue 3 years ago • 0 comments

I'm using Visual Studio Code with the Prisma extension. I'm also using Next.js with javascript.

When I'm doing a CRUD operation it would be handy if a model defined under schema.prisma could be shown in VS Code while coding, so you wouldn't have to go over to your schema.prisma to see how the model looks like.

const newOrder = await prisma.Order.create({
  data: {
    // Hmm... How did the Order model look like again..? Do I really have to go to my schema to view it? 
    // Can't it be shown in VS code while typing or atleast while hovering "Order"?
  },
});

Would also be nice if it worked when you go into a nested model/relation. Then it would display that model while on it.

Such as:

const newOrder = await prisma.Order.create({
  data: {
    stripe_payment_id: paymentID,
    delivery_address: {
      create: [
        {
          // Hmm.. How did the address model look like?
        }
      ]
    },
  },
});

LB22 avatar Mar 16 '22 12:03 LB22