-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(cli): regenerate prisma schema during keystone prisma ..
commands
#8698
Conversation
We also want to disable GrpahQL validations because it's no so important for prisma command.
This comment was marked as resolved.
This comment was marked as resolved.
Details here: #8697 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7ce4482:
|
@@ -19,8 +20,15 @@ export async function prisma(cwd: string, args: string[], frozen: boolean) { | |||
// TODO: this cannot be changed for now, circular dependency with getSystemPaths, getEsbuildConfig | |||
const config = getBuiltKeystoneConfiguration(cwd); | |||
const { graphQLSchema } = createSystem(config); | |||
await validatePrismaAndGraphQLSchemas(cwd, config, graphQLSchema); | |||
await generateTypescriptTypesAndPrisma(cwd, config, graphQLSchema); |
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.
Thinking about this with @borisno2, it is kind of weird that we did generateTypescriptTypesAndPrisma
here at all.
The validatePrismaAndGraphQLSchemas
protects the developer in production by respecting the existing schemas, but then we go ahead and re-generate the types and Prisma, which is weird for production.
I don't think we should keep generateTypescriptTypesAndPrisma
and users should either just run keystone dev
or keystone build --no-ui
before they use keystone prisma ...
.
Unfortunately, however you look at this, this is a breaking change, we do want to fix it @pahaz, but maybe the best workaround for you in the interim is to use keystone build --no-ui
before your migrate dev
command.
…ds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…ds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…ds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…ds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Author: Pavel White <[email protected]> Date: Mon Aug 14 02:53:50 2023 +0300 Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Author: Pavel White <[email protected]> Date: Mon Aug 14 02:53:50 2023 +0300 Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Author: Pavel White <[email protected]> Date: Mon Aug 14 02:53:50 2023 +0300 Co-authored-by: Daniel Cousens <[email protected]>
…nds (#8698) Author: Pavel White <[email protected]> Date: Mon Aug 14 02:53:50 2023 +0300 Co-authored-by: Daniel Cousens <[email protected]>
We also want to disable GrpahQL validations because it's not so important for the prisma command.