Class: SchemaWeaver

Constructors

new SchemaWeaver()

new SchemaWeaver(__namedParameters, context?): SchemaWeaver

Parameters

__namedParameters: SchemaWeaverParameters = {}

context?: WeaverContext

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:64

Properties

context

context: WeaverContext

Defined in

packages/core/src/schema/schema-weaver.ts:48


mutation?

optional mutation: LoomObjectType

Defined in

packages/core/src/schema/schema-weaver.ts:44


query?

optional query: LoomObjectType

Defined in

packages/core/src/schema/schema-weaver.ts:43


resolverOptions?

optional resolverOptions: ResolvingOptions

Defined in

packages/core/src/schema/schema-weaver.ts:50


subscription?

optional subscription: LoomObjectType

Defined in

packages/core/src/schema/schema-weaver.ts:45


types

types: Set<GraphQLNamedType>

Defined in

packages/core/src/schema/schema-weaver.ts:46

Accessors

fieldOptions

get protected fieldOptions(): object

Returns

object

resolverOptions

resolverOptions: undefined | ResolvingOptions

weaverContext

weaverContext: WeaverContext = context

Defined in

packages/core/src/schema/schema-weaver.ts:204

Methods

add()

add(resolver): SchemaWeaver

Parameters

resolver: SilkResolver

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:82


addResolver()

protected addResolver(resolver): SchemaWeaver

Parameters

resolver: SilkResolver

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:135


addType()

addType(silk): SchemaWeaver

Parameters

silk: GraphQLSilk<any, any>

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:92


addVendor()

addVendor(weaver): SchemaWeaver

Parameters

weaver: SchemaVendorWeaver

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:87


getOperationObject()

protected getOperationObject(type): LoomObjectType

Parameters

type: "query" | "mutation" | "subscription"

Returns

LoomObjectType

Defined in

packages/core/src/schema/schema-weaver.ts:176


setConfig()

setConfig<TConfig>(config): SchemaWeaver

Type Parameters

TConfig extends WeaverConfig

Parameters

config: TConfig

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:115


use()

use(...middlewares): SchemaWeaver

Parameters

• ...middlewares: Middleware[]

Returns

SchemaWeaver

Defined in

packages/core/src/schema/schema-weaver.ts:75


weaveGraphQLSchema()

weaveGraphQLSchema(): GraphQLSchema

Returns

GraphQLSchema

Defined in

packages/core/src/schema/schema-weaver.ts:120


config()

static config(config): CoreSchemaWeaverConfig

Create a Schema Weaver config object

Parameters

config: CoreSchemaWeaverConfigOptions

Schema Weaver config options

Returns

CoreSchemaWeaverConfig

a Schema Weaver config object

Defined in

packages/core/src/schema/schema-weaver.ts:57


optionsFrom()

static optionsFrom(...inputs): object

Parameters

• ...inputs: (GraphQLSilk<any, any> | SilkResolver | WeaverConfig | SchemaVendorWeaver | Middleware)[]

Returns

object

configs

configs: Set<WeaverConfig>

context

context: undefined | WeaverContext

middlewares

middlewares: Set<Middleware>

resolvers

resolvers: Set<SilkResolver>

silks

silks: Set<GraphQLSilk<any, any>>

weavers

weavers: Set<SchemaVendorWeaver>

Defined in

packages/core/src/schema/schema-weaver.ts:209


weave()

static weave(...inputs): GraphQLSchema

Weave a GraphQL Schema from resolvers

Parameters

• ...inputs: (GraphQLSilk<any, any> | SilkResolver | WeaverConfig | SchemaVendorWeaver | Middleware)[]

Resolvers, Global Middlewares or WeaverConfigs

Returns

GraphQLSchema

GraphQ LSchema

Defined in

packages/core/src/schema/schema-weaver.ts:255