Version: 1.0

DataSyncPlugin

DataSync plugin

Plugin is enabled by """ @datasync """ annotation It will generate delta queries

Hierarchy

  • GraphbackPlugin

    DataSyncPlugin

Index

Constructors

Properties

Methods

Constructors

constructor

+ new DataSyncPlugin(config?: DataSyncPluginConfig): DataSyncPlugin

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:21

Parameters:

NameType
config?DataSyncPluginConfig

Returns: DataSyncPlugin

Properties

Protected config

config: DataSyncPluginConfig

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:21

Methods

Protected addDataSyncFieldsToInputTypes

addDataSyncFieldsToInputTypes(schemaComposer: SchemaComposer‹any›, model: ModelDefinition): void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:151

Parameters:

NameType
schemaComposerSchemaComposer‹any›
modelModelDefinition

Returns: void


Protected addDataSyncFieldsToModel

addDataSyncFieldsToModel(schemaComposer: SchemaComposer‹any›, model: ModelDefinition): void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:129

Parameters:

NameType
schemaComposerSchemaComposer‹any›
modelModelDefinition

Returns: void


Protected addDeltaQuery

addDeltaQuery(schemaComposer: SchemaComposer‹unknown›, model: ModelDefinition): void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:165

Parameters:

NameType
schemaComposerSchemaComposer‹unknown›
modelModelDefinition

Returns: void


Protected addDeltaSyncResolver

addDeltaSyncResolver(model: ModelDefinition, resolvers: IResolvers): void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:108

Parameters:

NameType
modelModelDefinition
resolversIResolvers

Returns: void


createResolvers

createResolvers(metadata: GraphbackCoreMetadata): IResolvers

Overrides void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:78

Creates resolvers for Data Synchonization

Parameters:

NameTypeDescription
metadataGraphbackCoreMetadataCore metatata containing all model information

Returns: IResolvers


createResources

createResources(metadata: GraphbackCoreMetadata): void

Overrides void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:97

Parameters:

NameType
metadataGraphbackCoreMetadata

Returns: void


Private getDeltaTypeFieldNames

getDeltaTypeFieldNames(modelTC: GraphQLObjectType): string[]

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:208

Parameters:

NameType
modelTCGraphQLObjectType

Returns: string[]


getPluginName

getPluginName(): string

Overrides void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:104

Returns: string


Protected logError

logError(message: string): void

Inherited from DataSyncPlugin.logError

Defined in packages/graphback-core/types/plugin/GraphbackPlugin.d.ts:37

Parameters:

NameType
messagestring

Returns: void


Protected logWarning

logWarning(message: string): void

Inherited from DataSyncPlugin.logWarning

Defined in packages/graphback-core/types/plugin/GraphbackPlugin.d.ts:36

Parameters:

NameType
messagestring

Returns: void


transformSchema

transformSchema(metadata: GraphbackCoreMetadata): GraphQLSchema

Overrides void

Defined in packages/graphback-datasync/src/DataSyncPlugin.ts:31

Parameters:

NameType
metadataGraphbackCoreMetadata

Returns: GraphQLSchema