BFF Entities

Settings for scaffolding out an entity for your BFF.

BFF Entities

While you app won't be made up of strictly CRUD based and scaffolded items, this template should help you get some of the boilerplate out of the way

BFF Entity Properties

NameRequiredDescriptionDefault
NameYesThe name of the entityNone
PluralNoThe plural of the entity name, if needed (e.g. Cities would prevent Citys)Entity Name appended with an s
PropertiesYesA list of BFF entity properties assigned to your entity described in the entity properties section.None
FeaturesYesThis is a list of BFF features that you want to add for a particular entity.None

BFF Entity Properties

A list of properties that can be assigned to a BFF entity.

NameRequiredDescriptionDefault
NameYesThe name of the propertyNone
TypeYesThe data type for the property. These are not case sensitive and they can be set to nullable with a trailing ?. All standard typescript data types can be used here. You can add custom types for items like foreign objects, but you'll need to do some manual resolution on these.string

💡 Add a ? at the end of the type to make the property nullable.

BFF Features

NameRequiredDescriptionDefault
TypeYesThe type of feature you want to add. The accepted values are AdHoc, GetRecord, GetList, DeleteRecord, UpdateRecord, PatchRecord, AddRecord, and CreateRecord (same as AddRecord but available as an alias in case you can't remember!)None
IsProtectedNoDetermines whether or not the feature is protected with an authorization policy attribute.false
PermissionNameNoThe name of the authorization policy attribute.Can[FEATURENAME]

GetRecord, GetList, DeleteRecord, UpdateRecord, and AddRecord are all standard CRUD features along with their endpoints and associated tests. Additional features from your boundary scaffolding need to be manually configured.

BFF Entity Template Example

Entities:
  - Name: Recipe
    Features:
      - Type: GetList
      - Type: GetRecord
      - Type: AddRecord
      - Type: UpdateRecord
      - Type: DeleteRecord
    Properties:
      - Name: Title
      - Name: Directions
      - Name: RecipeSourceLink
      - Name: Description
      - Name: ImageLink
      - Name: Rating
        Type: number?
  - Name: Ingredient
    Features:
      - Type: GetList
      - Type: GetRecord
      - Type: AddRecord
      - Type: UpdateRecord
      - Type: DeleteRecord
    Properties:
      - Name: Title
      - Name: Directions
      - Name: RecipeSourceLink
      - Name: Description
      - Name: ImageLink
      - Name: Rating
        Type: number?