Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/mocksrctype-aliasesGetArgs

Type Alias: GetArgs<KeyT>

GetArgs<KeyT> = object

Defined in: packages/mock/src/types.ts:39

Type Parameters

KeyT

KeyT extends KeyTypeConstraints = string

Properties

defaultValue?

optional defaultValue?: unknown | {[fieldName: string]: any; }

Defined in: packages/mock/src/types.ts:61

If no value found, insert the defaultValue.


fieldArgs?

optional fieldArgs?: string | {[argName: string]: any; }

Defined in: packages/mock/src/types.ts:57

Optional arguments when querying the field.

Querying the field with the same arguments will return the same value. Deep equality is checked.

store.get('User', 1, 'friend', { id: 2 }) === store.get('User', 1, 'friend', { id: 2 }) store.get('User', 1, 'friend', { id: 2 }) !== store.get('User', 1, 'friend')

Args can be a record, just like args argument of field resolver or an arbitrary string.


fieldName?

optional fieldName?: string

Defined in: packages/mock/src/types.ts:42


key?

optional key?: KeyT

Defined in: packages/mock/src/types.ts:41


typeName

typeName: string

Defined in: packages/mock/src/types.ts:40