Custom Attribute Functions

Define functions for default values.

Project Toolchain Usage

This feature makes use of these Project Toolchain APIs: Middleware, Extensions. Because of this usage, it defines the following modules:

customAttributeFunctions

This module defines the following middleware and extensions identifiers that can be imported via Project Toolchain, along with their descriptions:

  • attributeFunctions - Remove empty OR blocks from queries.

To enable this optional feature, add the customAttributeFunctions element to your optionalFeatures array, then use the generated middleware or extension inside of your code.

Feature Effect

Whenever you attempt a create operation on a model, all fields that have a default function defined in the defaultFunctions configuration property will have their value set to the result of those functions.

Last updated