-
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
Move defaults to initConfig
#9027
Conversation
e1b90ec
to
e3f9b63
Compare
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 4860d3e:
|
489db49
to
5f3f5b5
Compare
…ly for singletons
5f3f5b5
to
4860d3e
Compare
@@ -4,7 +4,7 @@ import { createRequire } from 'node:module' | |||
import { printSchema, GraphQLSchema } from 'graphql' | |||
import { getGenerators, formatSchema } from '@prisma/internals' | |||
import type { KeystoneConfig } from './types' | |||
import { printGeneratedTypes } from './lib/schema-type-printer' | |||
import { printGeneratedTypes } from './lib/typescript-schema-printer' |
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.
Renamed to align with prisma-schema-printer.ts
, I don't know why it was .tsx
'@keystone-6/core': patch | ||
---- | ||
|
||
Use `idField` type of `{ kind: 'number', kind: 'Int' | 'BigInt' }` internally for singletons |
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.
why not just have static value for this?
may be global-config
or settings
or just add to list config applicable when isSingleton
is true;
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.
@gautamsi I didn't see a reason why we should prevent developers from having this kind of identifier type available for their own usage, while additionally allowing me me to remove isSingleton
logic from the id-field
This is a work in progress, and will probably span many pull requests, but wherever possible, we want to move the defaults into
initConfig
. In the next major,initConfig
will be removed in favour of this being internally managed only; allowing us to refine the internally used types to something stricter thanKeystoneConfig
.