Skip to content
KeystoneJS LogoKeystoneJS

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