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

fix(cli): regenerate prisma schema during keystone prisma .. commands #8698

Merged
merged 6 commits into from
Aug 13, 2023

Conversation

pahaz
Copy link
Contributor

@pahaz pahaz commented Jul 15, 2023

We also want to disable GrpahQL validations because it's not so important for the prisma command.

We also want to disable GrpahQL validations because it's no so important for prisma command.
@changeset-bot

This comment was marked as resolved.

@pahaz
Copy link
Contributor Author

pahaz commented Jul 15, 2023

Details here: #8697

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 15, 2023

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:

Sandbox Source
@keystone-6/sandbox Configuration

@@ -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);
Copy link
Member

@dcousens dcousens Jul 18, 2023

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.

@dcousens dcousens enabled auto-merge (squash) August 13, 2023 23:53
@dcousens dcousens merged commit 0ab61be into keystonejs:main Aug 13, 2023
35 of 37 checks passed
@dcousens dcousens self-assigned this Aug 13, 2023
dcousens added a commit that referenced this pull request Aug 15, 2023
dcousens added a commit that referenced this pull request Aug 30, 2023
dcousens added a commit that referenced this pull request Sep 10, 2023
@pahaz pahaz deleted the patch-6 branch March 10, 2024 15:15
dcousens added a commit that referenced this pull request Mar 28, 2024
dcousens added a commit that referenced this pull request Mar 28, 2024
dcousens added a commit that referenced this pull request Mar 28, 2024
dcousens added a commit that referenced this pull request Apr 4, 2024
…nds (#8698)

Author: Pavel White <[email protected]>
Date:   Mon Aug 14 02:53:50 2023 +0300

Co-authored-by: Daniel Cousens <[email protected]>
dcousens added a commit that referenced this pull request Apr 8, 2024
…nds (#8698)

Author: Pavel White <[email protected]>
Date:   Mon Aug 14 02:53:50 2023 +0300

Co-authored-by: Daniel Cousens <[email protected]>
dcousens added a commit that referenced this pull request Apr 8, 2024
…nds (#8698)

Author: Pavel White <[email protected]>
Date:   Mon Aug 14 02:53:50 2023 +0300

Co-authored-by: Daniel Cousens <[email protected]>
dcousens added a commit that referenced this pull request Apr 8, 2024
…nds (#8698)

Author: Pavel White <[email protected]>
Date:   Mon Aug 14 02:53:50 2023 +0300

Co-authored-by: Daniel Cousens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants