Version: 0.16.x

DataSyncProvider

Type parameters

Type

Hierarchy

  • GraphbackDataProvider‹Type›

    DataSyncProvider

Implemented by

Index

Methods

Methods

batchRead

batchRead(relationField: string, ids: string[], filter: QueryFilter, selectedFields?: string[]): Promise‹Type[][]›

Inherited from DataSyncProvider.batchRead

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:70

Read multiple items by their id's (used for lazy data loading purposes)

Parameters:

NameTypeDescription
relationFieldstringname of the field that will be used to match ids
idsstring[]array of identifiers that needs to be fetched
filterQueryFilterfilter by specific type
selectedFields?string[]-

Returns: Promise‹Type[][]›


count

count(filter: QueryFilter): Promise‹number›

Inherited from DataSyncProvider.count

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:61

Implementation for counting number of objects with filtering capabilities

Parameters:

NameTypeDescription
filterQueryFilterfilter by specific type

Returns: Promise‹number›


create

create(data: Type, selectedFields?: string[]): Promise‹Type›

Inherited from DataSyncProvider.create

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:23

Implementation for object creation

Parameters:

NameTypeDescription
dataTypeinput data
selectedFields?string[]-

Returns: Promise‹Type›


delete

delete(data: Partial‹Type›, selectedFields?: string[]): Promise‹Type›

Inherited from DataSyncProvider.delete

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:39

Implementation for object deletes

Parameters:

NameTypeDescription
dataPartial‹Type›data used for checking consistency
selectedFields?string[]-

Returns: Promise‹Type›


findBy

findBy(args?: FindByArgs, selectedFields?: string[]): Promise‹Type[]›

Inherited from DataSyncProvider.findBy

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:55

Implementation for reading objects with filtering capabilities

Parameters:

NameType
args?FindByArgs
selectedFields?string[]

Returns: Promise‹Type[]›


findOne

findOne(args: Partial‹Type›, selectedFields?: string[]): Promise‹Type›

Inherited from DataSyncProvider.findOne

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:46

Implementation for finding a single unique object

Parameters:

NameTypeDescription
argsPartial‹Type›filter by unique attriburtes
selectedFields?string[]-

Returns: Promise‹Type›


sync

sync(lastSync: Date, selectedFields?: string[], filter?: QueryFilter, limit?: number): Promise‹Type[]›

Defined in packages/graphback-datasync/src/providers/DataSyncProvider.ts:5

Parameters:

NameType
lastSyncDate
selectedFields?string[]
filter?QueryFilter
limit?number

Returns: Promise‹Type[]›


update

update(data: Partial‹Type›, selectedFields?: string[]): Promise‹Type›

Inherited from DataSyncProvider.update

Defined in packages/graphback-core/types/runtime/GraphbackDataProvider.d.ts:31

Implementation for object updates

Parameters:

NameTypeDescription
dataPartial‹Type›input data
selectedFields?string[]-

Returns: Promise‹Type›