Version: 1.0

DataSyncCRUDService

CRUD Service for datasync

Type parameters

T

Hierarchy

  • CRUDService‹T›

    DataSyncCRUDService

Implements

  • GraphbackCRUDService‹T›

Index

Constructors

Properties

Methods

Constructors

constructor

+ new DataSyncCRUDService(model: ModelDefinition, db: DataSyncProvider, config: CRUDServiceConfig): DataSyncCRUDService

Overrides void

Defined in packages/graphback-datasync/src/services/DataSyncCRUDService.ts:15

Parameters:

NameType
modelModelDefinition
dbDataSyncProvider
configCRUDServiceConfig

Returns: DataSyncCRUDService

Properties

Protected crudOptions

crudOptions: GraphbackCRUDGeneratorConfig

Inherited from DataSyncCRUDService.crudOptions

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


Protected db

db: GraphbackDataProvider

Inherited from DataSyncCRUDService.db

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:28


Protected model

model: ModelDefinition

Inherited from DataSyncCRUDService.model

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:29


Protected pubSub

pubSub: PubSubEngine

Inherited from DataSyncCRUDService.pubSub

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:30

Methods

batchLoadData

batchLoadData(relationField: string, id: string | number, filter: QueryFilter, context: GraphbackContext, info?: GraphQLResolveInfo): any

Inherited from DataSyncCRUDService.batchLoadData

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:41

Parameters:

NameType
relationFieldstring
idstring | number
filterQueryFilter
contextGraphbackContext
info?GraphQLResolveInfo

Returns: any


create

create(data: T, context?: GraphbackContext, info?: GraphQLResolveInfo): Promise‹T›

Inherited from DataSyncCRUDService.create

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:33

Parameters:

NameType
dataT
context?GraphbackContext
info?GraphQLResolveInfo

Returns: Promise‹T›


delete

delete(data: T, context?: GraphbackContext, info?: GraphQLResolveInfo): Promise‹T›

Inherited from DataSyncCRUDService.delete

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:35

Parameters:

NameType
dataT
context?GraphbackContext
info?GraphQLResolveInfo

Returns: Promise‹T›


findBy

findBy(args?: FindByArgs, context?: GraphbackContext, info?: GraphQLResolveInfo, path?: string): Promise‹ResultList‹T››

Inherited from DataSyncCRUDService.findBy

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:37

Parameters:

NameType
args?FindByArgs
context?GraphbackContext
info?GraphQLResolveInfo
path?string

Returns: Promise‹ResultList‹T››


findOne

findOne(args: Partial‹T›, context?: GraphbackContext, info?: GraphQLResolveInfo): Promise‹T›

Inherited from DataSyncCRUDService.findOne

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:36

Parameters:

NameType
argsPartial‹T›
context?GraphbackContext
info?GraphQLResolveInfo

Returns: Promise‹T›


subscribeToCreate

subscribeToCreate(filter?: QueryFilter): AsyncIterator‹T› | undefined

Inherited from DataSyncCRUDService.subscribeToCreate

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:38

Parameters:

NameType
filter?QueryFilter

Returns: AsyncIterator‹T› | undefined


subscribeToDelete

subscribeToDelete(filter?: QueryFilter): AsyncIterator‹T› | undefined

Inherited from DataSyncCRUDService.subscribeToDelete

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:40

Parameters:

NameType
filter?QueryFilter

Returns: AsyncIterator‹T› | undefined


subscribeToUpdate

subscribeToUpdate(filter?: QueryFilter): AsyncIterator‹T› | undefined

Inherited from DataSyncCRUDService.subscribeToUpdate

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

Parameters:

NameType
filter?QueryFilter

Returns: AsyncIterator‹T› | undefined


Protected subscriptionTopicMapping

subscriptionTopicMapping(triggerType: GraphbackOperationType, objectName: string): string

Inherited from DataSyncCRUDService.subscriptionTopicMapping

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:45

Provides way to map runtime topics for subscriptions for specific types and object names

Parameters:

NameType
triggerTypeGraphbackOperationType
objectNamestring

Returns: string


sync

sync(lastSync: Date, info?: GraphQLResolveInfo, filter?: any, limit?: number): Promise‹SyncList‹T››

Defined in packages/graphback-datasync/src/services/DataSyncCRUDService.ts:24

sync For delta queries

Parameters:

NameType
lastSyncDate
info?GraphQLResolveInfo
filter?any
limit?number

Returns: Promise‹SyncList‹T››


update

update(data: T, context?: GraphbackContext, info?: GraphQLResolveInfo): Promise‹T›

Inherited from DataSyncCRUDService.update

Defined in packages/graphback-core/types/runtime/CRUDService.d.ts:34

Parameters:

NameType
dataT
context?GraphbackContext
info?GraphQLResolveInfo

Returns: Promise‹T›