Skip to content

Class: SchemaBuilder

Defined in: packages/apollo/src/schema-builder.ts:64

Builds a GraphQL schema from decorator metadata stored in typeMetadataStorage. Follows the code-first schema generation pattern.

Constructors

Constructor

ts
new SchemaBuilder(container, buildSchemaOptions?): SchemaBuilder;

Defined in: packages/apollo/src/schema-builder.ts:74

Parameters

ParameterType
containerContainer
buildSchemaOptionsBuildSchemaOptions

Returns

SchemaBuilder

Methods

buildSchema()

ts
buildSchema(): GraphQLSchema;

Defined in: packages/apollo/src/schema-builder.ts:87

Builds and returns the complete GraphQL schema from registered metadata. Registers all object types, input types, enums, and scalars, then assembles the root Query / Mutation / Subscription types.

Returns

GraphQLSchema

Released under the MIT License.