APIExtensionDefinition

APIExtensionDefinition

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

Signature

interface APIExtensionDefinition {
  schema: DocumentNode;
  resolvers: Array<Type<any>>;
}

Members

schema

property
type:
DocumentNode

The schema extensions.

Example

const schema = gql`extend type SearchReindexResponse {
    timeTaken: Int!
    indexedItemCount: Int!
}`;

resolvers

property
type:
Array<Type<any>>

An array of resolvers for the schema extensions. Should be defined as Nest GraphQL resolver classes, i.e. using the Nest `