-
Notifications
You must be signed in to change notification settings - Fork 9
Upgrade to latest Keystone and update copy #369
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@@ -8,22 +8,12 @@ | |||
"build": "keystone build", | |||
"postinstall": "keystone postinstall" | |||
}, | |||
"// @aws-sdk": "temporary dependency until https://github.com/keystonejs/keystone/issues/8023 is resolved", |
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.
Unfortunate, but we can remove it when keystonejs/keystone#8023 is resolved
isIndexed: 'unique', | ||
isFilterable: 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.
The default is isFilterable: true
posts: relationship({ ref: 'Post.author', many: true }), | ||
}, | ||
// Here we can configure the Admin UI. We want to show a user's name and posts in the Admin UI | ||
ui: { |
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 didn't see a reason to keep this
|
||
createdAt: timestamp({ | ||
// this sets the timestamp to Date.now() when the user is first created | ||
defaultValue: { kind: 'now' } |
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.
As an example of a timestamp, this seemed more appropriate compared to publishDate
ui: { | ||
displayMode: 'segmented-control', | ||
}, | ||
}), |
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 think we can keep this example simple
If we introduce a status
to newcomers, we should do something useful with it.
On that point, we should update the blog example to do something with the status
(like hiding posts that aren't published).
'The SESSION_SECRET environment variable must be set in production' | ||
); | ||
} else { | ||
sessionSecret = '-- DEV COOKIE SECRET; CHANGE ME --'; |
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.
We shouldn't do this, someone will be burnt 🔥 by it, somewhere
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 guess the problem is this will force someone to login every time they update the schema
I think we need to decide what this example is meant to be. The balance at the moment is halfway between a template project (like |
I don't know if I'm aligned with the idea that we should ship a default example with
access: allowAll
, but I digress.I have at least removed the impression that access control might be in effect by removing the following code:
If we're going to add an
isAccessAllowed
to that effect, then we should add actual access control to everything.For now I have added the following copy to each of the mandatory
access
definitions:I might follow that up soon, but at least for now the user has plenty of warning and opportunity to learn what to change and where.