Skip to main content

@graphql-tools/wrap

Interfaces#

Type aliases#

Functions#

Type aliases#

DataTransformer#

Ƭ DataTransformer: (value: any, transformationContext: Record<string, any\>) => any

Type declaration#

▸ (value: any, transformationContext: Record<string, any\>): any

Parameters#

NameType
valueany
transformationContextRecord<string, any\>

Returns: any

Defined in: packages/wrap/src/types.ts:78


EnumValueTransformer#

Ƭ EnumValueTransformer: (typeName: string, externalValue: string, enumValueConfig: GraphQLEnumValueConfig) => GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined

Type declaration#

▸ (typeName: string, externalValue: string, enumValueConfig: GraphQLEnumValueConfig): GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined

Parameters#

NameType
typeNamestring
externalValuestring
enumValueConfigGraphQLEnumValueConfig

Returns: GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined

Defined in: packages/wrap/src/types.ts:62


ErrorsTransformer#

Ƭ ErrorsTransformer: (errors: ReadonlyArray<GraphQLError\>, transformationContext: Record<string, any\>) => GraphQLError[]

Type declaration#

▸ (errors: ReadonlyArray<GraphQLError\>, transformationContext: Record<string, any\>): GraphQLError[]

Parameters#

NameType
errorsReadonlyArray<GraphQLError\>
transformationContextRecord<string, any\>

Returns: GraphQLError[]

Defined in: packages/wrap/src/types.ts:82


FieldNodeTransformer#

Ƭ FieldNodeTransformer: (typeName: string, fieldName: string, fieldNode: FieldNode, fragments: Record<string, FragmentDefinitionNode\>, transformationContext: Record<string, any\>) => SelectionNode | SelectionNode[]

Type declaration#

▸ (typeName: string, fieldName: string, fieldNode: FieldNode, fragments: Record<string, FragmentDefinitionNode\>, transformationContext: Record<string, any\>): SelectionNode | SelectionNode[]

Parameters#

NameType
typeNamestring
fieldNamestring
fieldNodeFieldNode
fragmentsRecord<string, FragmentDefinitionNode\>
transformationContextRecord<string, any\>

Returns: SelectionNode | SelectionNode[]

Defined in: packages/wrap/src/types.ts:68


FieldTransformer#

Ƭ FieldTransformer<TContext\>: (typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, TContext\>) => GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Type parameters#

NameDefault
TContextRecord<string, any\>

Type declaration#

▸ (typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, TContext\>): GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Parameters#

NameType
typeNamestring
fieldNamestring
fieldConfigGraphQLFieldConfig<any, TContext\>

Returns: GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Defined in: packages/wrap/src/types.ts:50


InputFieldNodeTransformer#

Ƭ InputFieldNodeTransformer: (typeName: string, fieldName: string, inputFieldNode: ObjectFieldNode, request: Request, delegationContext?: DelegationContext) => ObjectFieldNode | ObjectFieldNode[]

Type declaration#

▸ (typeName: string, fieldName: string, inputFieldNode: ObjectFieldNode, request: Request, delegationContext?: DelegationContext): ObjectFieldNode | ObjectFieldNode[]

Parameters#

NameType
typeNamestring
fieldNamestring
inputFieldNodeObjectFieldNode
requestRequest
delegationContext?DelegationContext

Returns: ObjectFieldNode | ObjectFieldNode[]

Defined in: packages/wrap/src/types.ts:35


InputFieldTransformer#

Ƭ InputFieldTransformer: (typeName: string, fieldName: string, inputFieldConfig: GraphQLInputFieldConfig) => GraphQLInputFieldConfig | [string, GraphQLInputFieldConfig] | null | undefined

Type declaration#

▸ (typeName: string, fieldName: string, inputFieldConfig: GraphQLInputFieldConfig): GraphQLInputFieldConfig | [string, GraphQLInputFieldConfig] | null | undefined

Parameters#

NameType
typeNamestring
fieldNamestring
inputFieldConfigGraphQLInputFieldConfig

Returns: GraphQLInputFieldConfig | [string, GraphQLInputFieldConfig] | null | undefined

Defined in: packages/wrap/src/types.ts:29


InputObjectNodeTransformer#

Ƭ InputObjectNodeTransformer: (typeName: string, inputObjectNode: ObjectValueNode, request: Request, delegationContext?: DelegationContext) => ObjectValueNode

Type declaration#

▸ (typeName: string, inputObjectNode: ObjectValueNode, request: Request, delegationContext?: DelegationContext): ObjectValueNode

Parameters#

NameType
typeNamestring
inputObjectNodeObjectValueNode
requestRequest
delegationContext?DelegationContext

Returns: ObjectValueNode

Defined in: packages/wrap/src/types.ts:43


LeafValueTransformer#

Ƭ LeafValueTransformer: (typeName: string, value: any) => any

Type declaration#

▸ (typeName: string, value: any): any

Parameters#

NameType
typeNamestring
valueany

Returns: any

Defined in: packages/wrap/src/types.ts:76


ObjectValueTransformerMap#

Ƭ ObjectValueTransformerMap: Record<string, DataTransformer\>

Defined in: packages/wrap/src/types.ts:80


RootFieldTransformer#

Ƭ RootFieldTransformer<TContext\>: (operation: "Query" | "Mutation" | "Subscription", fieldName: string, fieldConfig: GraphQLFieldConfig<any, TContext\>) => GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Type parameters#

NameDefault
TContextRecord<string, any\>

Type declaration#

▸ (operation: "Query" | "Mutation" | "Subscription", fieldName: string, fieldConfig: GraphQLFieldConfig<any, TContext\>): GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Parameters#

NameType
operation"Query" | "Mutation" | "Subscription"
fieldNamestring
fieldConfigGraphQLFieldConfig<any, TContext\>

Returns: GraphQLFieldConfig<any, TContext\> | [string, GraphQLFieldConfig<any, TContext\>] | null | undefined

Defined in: packages/wrap/src/types.ts:56

Functions#

defaultCreateProxyingResolver#

defaultCreateProxyingResolver(__namedParameters: ICreateProxyingResolverOptions): GraphQLFieldResolver<any, any\>

Parameters#

NameType
__namedParametersICreateProxyingResolverOptions

Returns: GraphQLFieldResolver<any, any\>

Defined in: packages/wrap/src/generateProxyingResolvers.ts:91


defaultCreateRemoteResolver#

defaultCreateRemoteResolver(executor: Executor, subscriber: Subscriber): GraphQLFieldResolver<any, any\>

Parameters#

NameType
executorExecutor
subscriberSubscriber

Returns: GraphQLFieldResolver<any, any\>

Defined in: packages/wrap/src/makeRemoteExecutableSchema.ts:25


generateProxyingResolvers#

generateProxyingResolvers(subschemaConfig: SubschemaConfig): Record<string, Record<string, GraphQLFieldResolver<any, any\>\>\>

Parameters#

NameType
subschemaConfigSubschemaConfig

Returns: Record<string, Record<string, GraphQLFieldResolver<any, any\>\>\>

Defined in: packages/wrap/src/generateProxyingResolvers.ts:15


introspectSchema#

introspectSchema<TExecutor\>(executor: TExecutor, context?: Record<string, any\>, options?: IntrospectionOptions): TExecutor extends AsyncExecutor ? Promise<GraphQLSchema\> : GraphQLSchema

Type parameters#

NameType
TExecutorSyncExecutor<Record<string, any\>\> | AsyncExecutor<Record<string, any\>\>

Parameters#

NameType
executorTExecutor
context?Record<string, any\>
options?IntrospectionOptions

Returns: TExecutor extends AsyncExecutor ? Promise<GraphQLSchema\> : GraphQLSchema

Defined in: packages/wrap/src/introspect.ts:31


introspectSchemaSync#

introspectSchemaSync(executor: SyncExecutor, context?: Record<string, any\>, options?: IntrospectionOptions): GraphQLSchema

Parameters#

NameType
executorSyncExecutor
context?Record<string, any\>
options?IntrospectionOptions

Returns: GraphQLSchema

Defined in: packages/wrap/src/introspect.ts:44


makeRemoteExecutableSchema#

makeRemoteExecutableSchema(__namedParameters: IMakeRemoteExecutableSchemaOptions): GraphQLSchema

Parameters#

NameType
__namedParametersIMakeRemoteExecutableSchemaOptions

Returns: GraphQLSchema

Defined in: packages/wrap/src/makeRemoteExecutableSchema.ts:9


wrapSchema#

wrapSchema(subschemaConfig: SubschemaConfig): GraphQLSchema

Parameters#

NameType
subschemaConfigSubschemaConfig

Returns: GraphQLSchema

Defined in: packages/wrap/src/wrapSchema.ts:14