Docs
API
Interfaces
MockingFieldConfig

Interface: MockingFieldConfig

types/src.YamlConfig.MockingFieldConfig

Table of contents

Properties

Properties

apply

apply: string

Resolver path Example: User.firstName

Defined in

packages/types/src/config.ts:1860


custom

Optional custom: string

Custom mocking It can be a module or json file. Both "moduleName#exportName" or only "moduleName" would work

Defined in

packages/types/src/config.ts:1879


faker

Optional faker: string

Faker.js expression or function Read more (https://github.com/marak/Faker.js/#fakerfake) Example: faker: name.firstName faker: {{ name.firstName }} {{ name.lastName }}

Defined in

packages/types/src/config.ts:1873


if

Optional if: boolean

If this expression is truthy, mocking would be enabled You can use environment variables expression, for example: ${MOCKING_ENABLED}

Defined in

packages/types/src/config.ts:1865


length

Optional length: number

Length of the mock list For the list types [ObjectType], how many ObjectType you want to return? default: 2

Defined in

packages/types/src/config.ts:1885


store

Optional store: GetFromMockStoreConfig

Defined in

packages/types/src/config.ts:1886


updateStore

Optional updateStore: UpdateMockStoreConfig[]

Update the data on the mock store

Defined in

packages/types/src/config.ts:1890