Alokai

CustomResolvers

Custom utility functions which can be used to override the default behavior of the extractComponents function.

interface CustomResolvers {
	resolveEntry?: CustomResolver;
	resolveImage?: CustomResolver;
	resolveMetadata?: CustomResolver;
	resolveRichText?: CustomResolver;
	resolveSys?: CustomResolver;
}

Properties

NameRequiredTypeDescription
resolveEntryOptionalCustomResolverCustom resolver for the whole entry object. The default one removes the sys and metadata objects from the entry and resolves all of the linked entries recursively. For components (i.e. entries containing the components field), it preserves the original id and resolves the linked styles entry (if it exists).
resolveImageOptionalCustomResolverCustom resolver for the image object. The default one resolves images to the CMS-agnostic format expected by Vue Storefront universal components.
resolveMetadataOptionalCustomResolverCustom resolver for the metadata object. The default one does nothing to the object and simply returns it.
resolveRichTextOptionalCustomResolverCustom resolver for the rich text object.
resolveSysOptionalCustomResolverCustom resolver for the sys object. The default one does nothing to the object and simply returns it.

Referenced Types

On this page