Skip to content
KeystoneJS LogoKeystoneJS
👋🏻 Keystone 5 has officially moved to maintenance only. For the latest release of Keystone please visit the Keystone website.


The Checkbox field type stores a single Boolean value.


const { Checkbox, Text } = require('@keystonejs/fields');

keystone.createList('Products', {
  fields: {
    name: { type: Text },
    isEnabled: { type: Checkbox, isRequired: true },


isRequiredBooleanfalseDoes this field require a value?

The Checkbox field type doesn't support indexes or unique enforcement.


Uuid fields use the Boolean type in GraphQL.

Input fields

Field nameTypeDescription
${path}BooleanThe value to be stored

Output fields

Field nameTypeDescription
${path}BooleanThe stored value


Field nameTypeDescription
${path}IDMatching the value provided
${path}_notIDNot matching the value provided


Mongoose adapter

In Mongoose the field is added using the Boolean schema type.

The isRequired config option is enforces by KeystoneJS only.

Knex adapter

The Knex adapter uses the Knex boolean type:

The isRequired config option is enforces by KeystoneJS and, if equal to true, the column is set as not nullable.

On this page

  • Usage
  • Config
  • GraphQL
  • Input fields
  • Output fields
  • Filters
  • Storage
  • Mongoose adapter
  • Knex adapter
Edit on GitHub