prisma / language-tools

🌐 Prisma Language Tools = Language Server and Prisma's VS Code extension.
https://marketplace.visualstudio.com/items?itemName=Prisma.prisma
Apache License 2.0
257 stars 40 forks source link

The Prisma vscode extension does not resolve files that are inside nested directories when using `prismaSchemaFolder` #1803

Open tom-groves opened 2 weeks ago

tom-groves commented 2 weeks ago

Thanks for the excellent work on Prisma 😄 I'm encountering a bug as follows:

Bug description

I am using the prismaSchemaFolder preview feature. My source code is structured by module, i.e.:

src
├── modules
│   ├── company
│   │   ├── company.graphql
│   │   ├── company.prisma
│   │   └── company.resolver.ts
│   ├── project
│   │   ├── project.graphql
│   │   └── project.prisma
└── schema.prisma

The Prisma CLI is able to correctly generate based on the nested Prisma files, but the VS Code extension is not, as indicated in the following screenshot:

Screenshot 2024-11-04 at 10 43 25

How to reproduce

  1. Clone the repository at https://github.com/tom-groves/prisma-extension-nested-schema-folders-example
  2. Open in VS Code
  3. Running npx prisma generate will generate the Prisma Client successfully
  4. Nested Prisma schemas, such as src/modules/company/company.prisma, will be in an error state

Expected behavior

The Prisma extension resolves the various nested .prisma files.