Skip to content
KeystoneJS LogoKeystoneJS
👋🏻 We're working on the next generation of KeystoneJS! If you're using the @keystone-next packages, click here to learn more

singleton Plugin

This plugin makes a list singleton by allowing only one item in the list. Useful for list which must contain only one items.

Usage

JS
const { singleton } = require('@keystonejs/list-plugins');

keystone.createList('ListWithPlugin', {
  fields: {...},
  plugins: [
    singleton(),
  ],
});

On this page

  • Usage
Edit on GitHub