CodeVetter · Repo Unpack · Extension points
keystonejs/keystone
Keystone extensions are primarily configuration callbacks and typed factories rather than a central plugin registry. Lists, fields, hooks, actions, schema extensions, sessions, and storage strategies feed into generated runtime and UI structures. Transport and Admin UI generation expose additional integration boundaries.
- Custom fields plug in as FieldTypeFunc factories receiving provider/list/field metadata; their result supplies database shape, input/output resolvers, access, hooks, views, and Admin metadata.
- graphql.extendGraphqlSchema() receives the generated schema after core query/mutation assembly; createAuth() composes its authentication extension before the application's existing extension.
- list.actions entries are initialized into GraphQL argument types, singular/plural operation names, telemetry labels, and UI prompt/navigation metadata; field-rendered arguments cannot suppress the item prompt.
- Field and list resolveInput hooks transform data in that order; validation and beforeOperation/afterOperation hooks provide separate lifecycle stages around CRUD persistence.
- Database customization uses prismaClientOptions(), extendPrismaClient(), extendPrismaSchema(), and onConnect(); getKeystone() also accepts an existing Prisma client.
- Session strategies implement get/start/end, storedSessions accepts a store factory parameterized by maxAge, and asset StorageStrategy delegates put/delete/url with access to the Keystone context.
- Admin UI generation accepts ui.getAdditionalFiles() and discovers admin/pages files; additional files take precedence, and custom pages override matching generated pages.
- server.extendExpressApp() and extendHttpServer() run before Apollo middleware registration; document consumers separately extend editing through componentBlocks and DocumentFeatures without exposing Slate as the public customization contract.