@graphql-tools/wrap
Classes
- ExtractField
- FilterInputObjectFields
- FilterInterfaceFields
- FilterObjectFieldDirectives
- FilterObjectFields
- FilterRootFields
- FilterTypes
- HoistField
- MapFields
- MapLeafValues
- PruneSchema
- RemoveObjectFieldDeprecations
- RemoveObjectFieldDirectives
- RemoveObjectFieldsWithDeprecation
- RemoveObjectFieldsWithDirective
- RenameInputObjectFields
- RenameInterfaceFields
- RenameObjectFieldArguments
- RenameObjectFields
- RenameRootFields
- RenameRootTypes
- RenameTypes
- TransformCompositeFields
- TransformEnumValues
- TransformInputObjectFields
- TransformInterfaceFields
- TransformObjectFields
- TransformQuery
- TransformRootFields
- WrapFields
- WrapQuery
- WrapType
Type Aliases
- DataTransformer
- EnumValueTransformer
- ErrorsTransformer
- FieldNodeTransformer
- FieldTransformer
- InputFieldNodeTransformer
- InputFieldTransformer
- InputObjectNodeTransformer
- LeafValueTransformer
- ObjectValueTransformerMap
- RootFieldTransformer
- SchemaFromExecutorOptions
Functions
Type Aliases
DataTransformer
Ƭ DataTransformer: (value
: any
, transformationContext
: Record
<string
, any
>) => any
Type declaration
▸ (value
, transformationContext
): any
Parameters
Name | Type |
---|---|
value | any |
transformationContext | Record <string , any > |
Returns
any
Defined in
EnumValueTransformer
Ƭ EnumValueTransformer: (typeName
: string
, externalValue
: string
, enumValueConfig
: GraphQLEnumValueConfig
) => Maybe
<GraphQLEnumValueConfig
| [string
, GraphQLEnumValueConfig
]>
Type declaration
▸ (typeName
, externalValue
, enumValueConfig
): Maybe
<GraphQLEnumValueConfig
| [string
, GraphQLEnumValueConfig
]>
Parameters
Name | Type |
---|---|
typeName | string |
externalValue | string |
enumValueConfig | GraphQLEnumValueConfig |
Returns
Maybe
<GraphQLEnumValueConfig
| [string
, GraphQLEnumValueConfig
]>
Defined in
ErrorsTransformer
Ƭ ErrorsTransformer: (errors
: ReadonlyArray
<GraphQLError
> | undefined
, transformationContext
: Record
<string
, any
>) => GraphQLError
[] | undefined
Type declaration
▸ (errors
, transformationContext
): GraphQLError
[] | undefined
Parameters
Name | Type |
---|---|
errors | ReadonlyArray <GraphQLError > | undefined |
transformationContext | Record <string , any > |
Returns
GraphQLError
[] | undefined
Defined in
FieldNodeTransformer
Ƭ FieldNodeTransformer: (typeName
: string
, fieldName
: string
, fieldNode
: FieldNode
, fragments
: Record
<string
, FragmentDefinitionNode
>, transformationContext
: Record
<string
, any
>) => Maybe
<SelectionNode
| SelectionNode
[]>
Type declaration
▸ (typeName
, fieldName
, fieldNode
, fragments
, transformationContext
): Maybe
<SelectionNode
| SelectionNode
[]>
Parameters
Name | Type |
---|---|
typeName | string |
fieldName | string |
fieldNode | FieldNode |
fragments | Record <string , FragmentDefinitionNode > |
transformationContext | Record <string , any > |
Returns
Maybe
<SelectionNode
| SelectionNode
[]>
Defined in
FieldTransformer
Ƭ FieldTransformer<TContext
>: (typeName
: string
, fieldName
: string
, fieldConfig
: GraphQLFieldConfig
<any
, TContext
>) => Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Type parameters
Name | Type |
---|---|
TContext | Record <string , any > |
Type declaration
▸ (typeName
, fieldName
, fieldConfig
): Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Parameters
Name | Type |
---|---|
typeName | string |
fieldName | string |
fieldConfig | GraphQLFieldConfig <any , TContext > |
Returns
Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Defined in
InputFieldNodeTransformer
Ƭ InputFieldNodeTransformer: <TContext>(typeName
: string
, fieldName
: string
, inputFieldNode
: ObjectFieldNode
, request
: ExecutionRequest
, delegationContext?
: DelegationContext
<TContext
>) => ObjectFieldNode
| ObjectFieldNode
[]
Type declaration
▸ <TContext
>(typeName
, fieldName
, inputFieldNode
, request
, delegationContext?
): ObjectFieldNode
| ObjectFieldNode
[]
Type parameters
Name |
---|
TContext |
Parameters
Name | Type |
---|---|
typeName | string |
fieldName | string |
inputFieldNode | ObjectFieldNode |
request | ExecutionRequest |
delegationContext? | DelegationContext <TContext > |
Returns
ObjectFieldNode
| ObjectFieldNode
[]
Defined in
InputFieldTransformer
Ƭ InputFieldTransformer: (typeName
: string
, fieldName
: string
, inputFieldConfig
: GraphQLInputFieldConfig
) => GraphQLInputFieldConfig
| [string
, GraphQLInputFieldConfig
] | null
| undefined
Type declaration
▸ (typeName
, fieldName
, inputFieldConfig
): GraphQLInputFieldConfig
| [string
, GraphQLInputFieldConfig
] | null
| undefined
Parameters
Name | Type |
---|---|
typeName | string |
fieldName | string |
inputFieldConfig | GraphQLInputFieldConfig |
Returns
GraphQLInputFieldConfig
| [string
, GraphQLInputFieldConfig
] | null
| undefined
Defined in
InputObjectNodeTransformer
Ƭ InputObjectNodeTransformer: <TContext>(typeName
: string
, inputObjectNode
: ObjectValueNode
, request
: ExecutionRequest
, delegationContext?
: DelegationContext
<TContext
>) => ObjectValueNode
| undefined
Type declaration
▸ <TContext
>(typeName
, inputObjectNode
, request
, delegationContext?
): ObjectValueNode
| undefined
Type parameters
Name |
---|
TContext |
Parameters
Name | Type |
---|---|
typeName | string |
inputObjectNode | ObjectValueNode |
request | ExecutionRequest |
delegationContext? | DelegationContext <TContext > |
Returns
ObjectValueNode
| undefined
Defined in
LeafValueTransformer
Ƭ LeafValueTransformer: (typeName
: string
, value
: any
) => any
Type declaration
▸ (typeName
, value
): any
Parameters
Name | Type |
---|---|
typeName | string |
value | any |
Returns
any
Defined in
ObjectValueTransformerMap
Ƭ ObjectValueTransformerMap: Record
<string
, DataTransformer
>
Defined in
RootFieldTransformer
Ƭ RootFieldTransformer<TContext
>: (operation
: "Query"
| "Mutation"
| "Subscription"
, fieldName
: string
, fieldConfig
: GraphQLFieldConfig
<any
, TContext
>) => Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Type parameters
Name | Type |
---|---|
TContext | Record <string , any > |
Type declaration
▸ (operation
, fieldName
, fieldConfig
): Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Parameters
Name | Type |
---|---|
operation | "Query" | "Mutation" | "Subscription" |
fieldName | string |
fieldConfig | GraphQLFieldConfig <any , TContext > |
Returns
Maybe
<GraphQLFieldConfig
<any
, TContext
> | [string
, GraphQLFieldConfig
<any
, TContext
>]>
Defined in
SchemaFromExecutorOptions
Ƭ SchemaFromExecutorOptions: Partial
<IntrospectionOptions
> & Parameters
<typeof buildClientSchema
>[1
] & ParseOptions
Defined in
packages/wrap/src/introspect.ts:46
Functions
defaultCreateProxyingResolver
▸ defaultCreateProxyingResolver<TContext
>(«destructured»
): GraphQLFieldResolver
<any
, any
>
Type parameters
Name | Type |
---|---|
TContext | extends Record <string , any > |
Parameters
Name | Type |
---|---|
«destructured» | ICreateProxyingResolverOptions <TContext > |
Returns
GraphQLFieldResolver
<any
, any
>
Defined in
packages/wrap/src/generateProxyingResolvers.ts:89
generateProxyingResolvers
▸ generateProxyingResolvers<TContext
>(subschemaConfig
): Record
<string
, Record
<string
, GraphQLFieldResolver
<any
, any
>>>
Type parameters
Name | Type |
---|---|
TContext | extends Record <string , any > |
Parameters
Name | Type |
---|---|
subschemaConfig | SubschemaConfig <any , any , any , TContext > |
Returns
Record
<string
, Record
<string
, GraphQLFieldResolver
<any
, any
>>>
Defined in
packages/wrap/src/generateProxyingResolvers.ts:13
schemaFromExecutor
▸ schemaFromExecutor(executor
, context?
, options?
): GraphQLSchema
Parameters
Name | Type |
---|---|
executor | SyncExecutor |
context? | Record <string , any > |
options? | Partial <IntrospectionOptions > & GraphQLSchemaValidationOptions & ParseOptions |
Returns
GraphQLSchema
Defined in
packages/wrap/src/introspect.ts:50
▸ schemaFromExecutor(executor
, context?
, options?
): Promise
<GraphQLSchema
>
Parameters
Name | Type |
---|---|
executor | AsyncExecutor |
context? | Record <string , any > |
options? | Partial <IntrospectionOptions > & GraphQLSchemaValidationOptions & ParseOptions |
Returns
Promise
<GraphQLSchema
>
Defined in
packages/wrap/src/introspect.ts:55
▸ schemaFromExecutor(executor
, context?
, options?
): MaybePromise
<GraphQLSchema
>
Parameters
Name | Type |
---|---|
executor | Executor |
context? | Record <string , any > |
options? | Partial <IntrospectionOptions > & GraphQLSchemaValidationOptions & ParseOptions |
Returns
MaybePromise
<GraphQLSchema
>
Defined in
packages/wrap/src/introspect.ts:60
wrapSchema
▸ wrapSchema<TConfig
>(subschemaConfig
): GraphQLSchema
Type parameters
Name | Type |
---|---|
TConfig | extends Record <string , any > = Record <string , any > |
Parameters
Name | Type |
---|---|
subschemaConfig | SubschemaConfig <any , any , any , TConfig > | Subschema <any , any , any , TConfig > |
Returns
GraphQLSchema