mock_src.mockstore

Class: MockStore#

mock/src.MockStore

Implements#

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

+ new MockStore(__namedParameters: { mocks?: IMocks ; schema: GraphQLSchema ; typePolicies?: { [typeName: string]: TypePolicy; } }): MockStore

Parameters:#

NameType
__namedParametersobject
__namedParameters.mocks?IMocks
__namedParameters.schemaGraphQLSchema
__namedParameters.typePolicies?object

Returns: MockStore

Defined in: packages/mock/src/MockStore.ts:53

Properties#

schema#

schema: GraphQLSchema

Implementation of: IMockStore.schema

Defined in: packages/mock/src/MockStore.ts:47

Methods#

get#

get<KeyT, ReturnKeyT\>(_typeName: string | Ref<KeyT\> | GetArgs<KeyT\>, _key?: string | string[] | KeyT | { [fieldName: string]: any; }, _fieldName?: string | string[] | { [fieldName: string]: any; } | { [argName: string]: any; }, _fieldArgs?: string | { [argName: string]: any; }): unknown

Type parameters:#

NameTypeDefault
KeyTKeyTypeConstraintsstring
ReturnKeyTKeyTypeConstraintsstring

Parameters:#

NameType
_typeNamestring | Ref<KeyT\> | GetArgs<KeyT\>
_key?string | string[] | KeyT | { [fieldName: string]: any; }
_fieldName?string | string[] | { [fieldName: string]: any; } | { [argName: string]: any; }
_fieldArgs?string | { [argName: string]: any; }

Returns: unknown

Defined in: packages/mock/src/MockStore.ts:71


set#

set<KeyT\>(_typeName: string | Ref<KeyT\> | SetArgs<KeyT\>, _key?: string | KeyT | { [fieldName: string]: any; }, _fieldName?: unknown, _value?: unknown): void

Type parameters:#

NameType
KeyTKeyTypeConstraints

Parameters:#

NameType
_typeNamestring | Ref<KeyT\> | SetArgs<KeyT\>
_key?string | KeyT | { [fieldName: string]: any; }
_fieldName?unknown
_value?unknown

Returns: void

Defined in: packages/mock/src/MockStore.ts:133