The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

GraphQL Tools

GraphQL Tools

A set of utilities for faster GraphQL development

Get Started

@graphql-tools/stitch#

Table of contents#

Enumerations#

Interfaces#

Type aliases#

Variables#

Functions#

Type aliases#

MergeTypeFilter#

Ƭ MergeTypeFilter<TContext\>: (mergeTypeCandidates: MergeTypeCandidate<TContext\>[], typeName: string) => boolean

Type parameters#

NameType
TContextRecord<string, any\>

Type declaration#

▸ (mergeTypeCandidates, typeName): boolean

Parameters#
NameType
mergeTypeCandidatesMergeTypeCandidate<TContext\>[]
typeNamestring
Returns#

boolean

Defined in#

packages/stitch/src/types.ts:48


OnTypeConflict#

Ƭ OnTypeConflict<TContext\>: (left: GraphQLNamedType, right: GraphQLNamedType, info?: { left: { subschema?: GraphQLSchema | SubschemaConfig<any, any, any, TContext\> ; transformedSubschema?: Subschema<any, any, any, TContext\> } ; right: { subschema?: GraphQLSchema | SubschemaConfig<any, any, any, TContext\> ; transformedSubschema?: Subschema<any, any, any, TContext\> } }) => GraphQLNamedType

Type parameters#

NameType
TContextRecord<string, any\>

Type declaration#

▸ (left, right, info?): GraphQLNamedType

Parameters#
NameType
leftGraphQLNamedType
rightGraphQLNamedType
info?Object
info.leftObject
info.left.subschema?GraphQLSchema | SubschemaConfig<any, any, any, TContext\>
info.left.transformedSubschema?Subschema<any, any, any, TContext\>
info.rightObject
info.right.subschema?GraphQLSchema | SubschemaConfig<any, any, any, TContext\>
info.right.transformedSubschema?Subschema<any, any, any, TContext\>
Returns#

GraphQLNamedType

Defined in#

packages/stitch/src/types.ts:93


SubschemaConfigTransform#

Ƭ SubschemaConfigTransform<TContext\>: (subschemaConfig: SubschemaConfig<any, any, any, TContext\>) => SubschemaConfig<any, any, any, TContext\> | SubschemaConfig<any, any, any, TContext\>[]

Type parameters#

NameType
TContextRecord<string, any\>

Type declaration#

▸ (subschemaConfig): SubschemaConfig<any, any, any, TContext\> | SubschemaConfig<any, any, any, TContext\>[]

Parameters#
NameType
subschemaConfigSubschemaConfig<any, any, any, TContext\>
Returns#

SubschemaConfig<any, any, any, TContext\> | SubschemaConfig<any, any, any, TContext\>[]

Defined in#

packages/stitch/src/types.ts:67

Variables#

defaultSubschemaConfigTransforms#

Const defaultSubschemaConfigTransforms: SubschemaConfigTransform<any\>[]

Defined in#

packages/stitch/src/subschemaConfigTransforms/index.ts:8

Functions#

computedDirectiveTransformer#

computedDirectiveTransformer(computedDirectiveName): SubschemaConfigTransform

Parameters#

NameType
computedDirectiveNamestring

Returns#

SubschemaConfigTransform

Defined in#

packages/stitch/src/subschemaConfigTransforms/computedDirectiveTransformer.ts:6


createMergedTypeResolver#

createMergedTypeResolver<TContext\>(mergedTypeResolverOptions): MergedTypeResolver<TContext\> | undefined

Type parameters#

NameType
TContextany

Parameters#

NameType
mergedTypeResolverOptionsMergedTypeResolverOptions

Returns#

MergedTypeResolver<TContext\> | undefined

Defined in#

packages/stitch/src/createMergedTypeResolver.ts:5


forwardArgsToSelectionSet#

Const forwardArgsToSelectionSet(selectionSet, mapping?): (field: FieldNode) => SelectionSetNode

Parameters#

NameType
selectionSetstring
mapping?Record<string, string[]\>

Returns#

fn

▸ (field): SelectionSetNode

Parameters#
NameType
fieldFieldNode
Returns#

SelectionSetNode

Defined in#

packages/stitch/src/selectionSetArgs.ts:4


handleRelaySubschemas#

handleRelaySubschemas(subschemas, getTypeNameFromId?): SubschemaConfig<any, any, any, Record<string, any\>\>[]

Parameters#

NameType
subschemasSubschemaConfig[]
getTypeNameFromId?(id: string) => string

Returns#

SubschemaConfig<any, any, any, Record<string, any\>\>[]

Defined in#

packages/stitch/src/relay.ts:11


isolateComputedFieldsTransformer#

isolateComputedFieldsTransformer(subschemaConfig): SubschemaConfig[]

Parameters#

NameType
subschemaConfigSubschemaConfig

Returns#

SubschemaConfig[]

Defined in#

packages/stitch/src/subschemaConfigTransforms/isolateComputedFieldsTransformer.ts:9


splitMergedTypeEntryPointsTransformer#

splitMergedTypeEntryPointsTransformer(subschemaConfig): SubschemaConfig[]

Parameters#

NameType
subschemaConfigSubschemaConfig

Returns#

SubschemaConfig[]

Defined in#

packages/stitch/src/subschemaConfigTransforms/splitMergedTypeEntryPointsTransformer.ts:3


stitchSchemas#

stitchSchemas<TContext\>(__namedParameters): GraphQLSchema

Type parameters#

NameType
TContextRecord<string, any\>

Parameters#

NameType
__namedParametersIStitchSchemasOptions<TContext\>

Returns#

GraphQLSchema

Defined in#

packages/stitch/src/stitchSchemas.ts:27