Version: 0.16.x

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:145

Parameters:

NameType
schemaComposerSchemaComposer‹any›
modelModelDefinition

Returns: void


Protected addDataSyncFieldsToModel#

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

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

Parameters:

NameType
schemaComposerSchemaComposer‹any›
modelModelDefinition

Returns: void


Protected addDeltaQuery#

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

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

Parameters:

NameType
schemaComposerSchemaComposer‹unknown›
modelModelDefinition

Returns: void


Protected addDeltaSyncResolver#

addDeltaSyncResolver(model: ModelDefinition, queryObj: IFieldResolver‹any, any›): void

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

Parameters:

NameType
modelModelDefinition
queryObjIFieldResolver‹any, any›

Returns: void


createResolvers#

createResolvers(metadata: GraphbackCoreMetadata): IResolvers

Overrides void

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

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:95

Parameters:

NameType
metadataGraphbackCoreMetadata

Returns: void


Private getDeltaTypeFieldNames#

getDeltaTypeFieldNames(modelTC: GraphQLObjectType): string[]

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

Parameters:

NameType
modelTCGraphQLObjectType

Returns: string[]


getPluginName#

getPluginName(): string

Overrides void

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

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