Skip to main content

VendurePluginMetadata

Defines the metadata of a Vendure plugin. This interface is an superset of the Nestjs ModuleMetadata (which allows the definition of imports, exports, providers and controllers), which means that any Nestjs Module is a valid Vendure plugin. In addition, the VendurePluginMetadata allows the definition of extra properties specific to Vendure.

Signature
  • Extends: ModuleMetadata

configuration

A function which can modify the VendureConfig object before the server bootstraps.

shopApiExtensions

The plugin may extend the default Vendure GraphQL shop api by providing extended schema definitions and any required resolvers.

adminApiExtensions

The plugin may extend the default Vendure GraphQL admin api by providing extended schema definitions and any required resolvers.

entities

propertyArray<Type<any>> | (() => Array<Type<any>>)

The plugin may define custom TypeORM database entities.

dashboard

propertyDashboardExtension

compatibility

propertystringv2.0.0

The plugin should define a valid semver version string to indicate which versions of Vendure core it is compatible with. Attempting to use a plugin with an incompatible version of Vendure will result in an error and the server will be unable to bootstrap.

If a plugin does not define this property, a message will be logged on bootstrap that the plugin is not guaranteed to be compatible with the current version of Vendure.

To effectively disable this check for a plugin, you can use an overly-permissive string such as >0.0.0.

Note

Since Vendure v3.1.0, it is possible to ignore compatibility errors for specific plugins by passing the ignoreCompatibilityErrorsForPlugins option to the bootstrap function.

Example

Ts

An object which allows a plugin to extend the Vendure GraphQL API.

Signature

schema

propertyDocumentNode | ((schema?: GraphQLSchema) => DocumentNode | undefined)

Extensions to the schema. Passes the current schema as an optional argument, allowing the extension to be based on the existing schema.

Example

Ts

resolvers

propertyArray<Type<any>> | (() => Array<Type<any>>)

An array of resolvers for the schema extensions. Should be defined as Nestjs GraphQL resolver classes, i.e. using the Nest @Resolver() decorator etc.

scalars

propertyRecord<string, GraphQLScalarType> | (() => Record<string, GraphQLScalarType>)v1.7.0

A map of GraphQL scalar types which should correspond to any custom scalars defined in your schema. Read more about defining custom scalars in the Apollo Server Custom Scalars docs

This method is called before the app bootstraps and should be used to perform any needed modifications to the VendureConfig.

Signature
Was this chapter helpful?
Report Issue
Edited Feb 25, 2026ยทEdit this page