Skip to content
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

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

Open
tom-groves opened this issue Nov 4, 2024 · 0 comments

Comments

@tom-groves
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant