Skip to content
KeystoneJS LogoKeystoneJS (α)

keystone.createList() API

Usage

keystone.createList('Post', {
  /* ... */
});

API

options

fields

defaultValue

If not set, or set to undefined, it must be provided when creating new items. For a 'nullable' field, set defaultValue: null.

NOTE: Some types have a pre-configured defaultValue;

  • Relationship: null

NOTE: This can have impacts when combined with access control where it's possible a user is never able to create new items because they don't have access to create a certain field, which attempts to use the defaultValue, but then throws an error because no defaultValue has been set.

Have you found a mistake, something that is missing, or could be improved on this page? Please edit the Markdown file on GitHub and submit a PR with your changes.

Edit Page