Version: 1.0

GraphbackCoreMetadata

Contains Graphback Core Models

Hierarchy#

  • GraphbackCoreMetadata

Index#

Constructors#

Properties#

Methods#

Constructors#

constructor#

+ new GraphbackCoreMetadata(globalConfig: GraphbackGlobalConfig, schema: GraphQLSchema): GraphbackCoreMetadata

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:31

Parameters:

NameType
globalConfigGraphbackGlobalConfig
schemaGraphQLSchema

Returns: GraphbackCoreMetadata

Properties#

Private models#

models: ModelDefinition[]

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:31


Private resolvers#

resolvers: IResolvers

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:30


Private schema#

schema: GraphQLSchema

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:29


Private supportedCrudMethods#

supportedCrudMethods: GraphbackCRUDGeneratorConfig

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:28

Methods#

addResolvers#

addResolvers(resolvers: IResolvers): void

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:46

Parameters:

NameType
resolversIResolvers

Returns: void


Private buildModel#

buildModel(modelType: GraphQLObjectType, relationships: FieldRelationshipMetadata[]): ModelDefinition

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:93

Parameters:

NameType
modelTypeGraphQLObjectType
relationshipsFieldRelationshipMetadata[]

Returns: ModelDefinition


getGraphQLTypesWithModel#

getGraphQLTypesWithModel(): GraphQLObjectType[]

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:87

Helper for plugins to fetch all types that should be processed by Graphback plugins. To mark type as enabled for graphback generators we need to add model annotations over the type.

Returns all user types that have @model in description

Returns: GraphQLObjectType[]


getModelDefinitions#

getModelDefinitions(): ModelDefinition[]

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:63

Get Graphback Models - GraphQL Types with additional CRUD configuration

Returns: ModelDefinition[]


getResolvers#

getResolvers(): IResolvers

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:56

Returns: IResolvers


getSchema#

getSchema(): GraphQLSchema‹›

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:38

Returns: GraphQLSchema‹›


setSchema#

setSchema(newSchema: GraphQLSchema): void

Defined in packages/graphback-core/src/plugin/GraphbackCoreMetadata.ts:42

Parameters:

NameType
newSchemaGraphQLSchema

Returns: void