The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Skip to main content

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:1075


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:1094


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:1088


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:1080


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:1100


store#

Optional store: GetFromMockStoreConfig

Defined in#

packages/types/src/config.ts:1101


updateStore#

Optional updateStore: UpdateMockStoreConfig[]

Update the data on the mock store

Defined in#

packages/types/src/config.ts:1105