Skip to content

Models newly defined in schema.prisma are not strongly typed in my resolver until I restart VS Code. What am I missing? #1164

Answered by Weakky
uncvrd asked this question in General
Discussion options

You must be logged in to vote

Erf. That's unfortunately a VS Code problem. We've worked hard to prevent that from happening but it looks like there are still cases where this happens.

The TLDR is that, as we regenerate the typings, VS Code doesn't always pick up these changes and so the types end up not being refreshed and you don't see these new typings. Most of the time, when that happens, you have two options:

  • Restarting the TS Server

  • CMD + CTRL clicking on either the Prisma Client or a Nexus method so that it brings you to the typings, which should make VS Code refresh those typings. Just like you ended up doing.

While this is not ideal at all, we're still actively looking to understand why VS Code is prope…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@uncvrd
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Weakky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants