-
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 field visilibity in AdminUI when omitted #8715
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
? f.ui?.listView?.fieldMode ?? f.ui?.listView?.defaultFieldMode | ||
: 'hidden', | ||
}, | ||
}, |
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.
I have moved this behaviour from createAdminMeta.ts
to logically group this near isEnabled
- types-for-lists.ts
is not an appropriate name
@@ -62,6 +62,8 @@ function getSudoGraphQLSchema(config: KeystoneConfig) { | |||
const lists = initialiseLists(transformedConfig); | |||
const adminMeta = createAdminMeta(transformedConfig, lists); | |||
return createGraphQLSchema(transformedConfig, lists, adminMeta, true); | |||
// TODO: adminMeta not required | |||
// return createGraphQLSchema(transformedConfig, lists, null, 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.
I can't think of a reason why a sudo
context would have an adminMeta
, but this would be a breaking change if someone was querying that using getContext
or similar
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 5224880:
|
graphql.omit: true
0c63b58
to
4493ff4
Compare
Looks good, looks like a test is failing though |
Fixes #8714, and switches to verbose snapshot testing of the possibility space in https://github.com/keystonejs/keystone/pull/8715/files#diff-c56d1cc3cff659fd4ab13d4370524a79120c964e3279953eeb0782fc79a48ca5, that way we can track visibility changes easily moving forward.