Skip to main content

@graphql-tools/utils

Enumerations#

Classes#

Interfaces#

Type aliases#

Functions#

References#

AsyncExecutor#

Re-exports: AsyncExecutor


ExecutionParams#

Re-exports: ExecutionParams


Executor#

Re-exports: Executor


Subscriber#

Re-exports: Subscriber


SyncExecutor#

Re-exports: SyncExecutor

Type aliases#

AbstractTypeMapper#

Ƭ AbstractTypeMapper: (type: GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLInterfaceType | GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema): GraphQLInterfaceType | GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLInterfaceType | GraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLInterfaceType | GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:487


AbstractTypeVisitor#

Ƭ AbstractTypeVisitor: (type: GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLInterfaceType | GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema): GraphQLInterfaceType | GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLInterfaceType | GraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLInterfaceType | GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:394


ArgumentFilter#

Ƭ ArgumentFilter: (typeName?: string, fieldName?: string, argName?: string, argConfig?: GraphQLArgumentConfig) => boolean

Type declaration#

▸ (typeName?: string, fieldName?: string, argName?: string, argConfig?: GraphQLArgumentConfig): boolean

Parameters#

NameType
typeName?string
fieldName?string
argName?string
argConfig?GraphQLArgumentConfig

Returns: boolean

Defined in: packages/utils/src/Interfaces.ts:215


ArgumentMapper#

Ƭ ArgumentMapper: (argumentConfig: GraphQLArgumentConfig, fieldName: string, typeName: string, schema: GraphQLSchema) => GraphQLArgumentConfig | [string, GraphQLArgumentConfig] | null | undefined

Type declaration#

▸ (argumentConfig: GraphQLArgumentConfig, fieldName: string, typeName: string, schema: GraphQLSchema): GraphQLArgumentConfig | [string, GraphQLArgumentConfig] | null | undefined

Parameters#

NameType
argumentConfigGraphQLArgumentConfig
fieldNamestring
typeNamestring
schemaGraphQLSchema

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

Defined in: packages/utils/src/Interfaces.ts:513


Callback#

Ƭ Callback: (value?: any) => any

Type declaration#

▸ (value?: any): any

Parameters#

NameType
value?any

Returns: any

Defined in: packages/utils/src/observableToAsyncIterable.ts:15


CompositeTypeMapper#

Ƭ CompositeTypeMapper: (type: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema): GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:475


CompositeTypeVisitor#

Ƭ CompositeTypeVisitor: (type: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema): GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:379


Constructor#

Ƭ Constructor<T\>: (...args: any[]) => T

Type parameters#

Name
T

Type declaration#

+ (...args: any[]): T

Parameters#

NameType
...argsany[]

Returns: T

Defined in: packages/utils/src/types.ts:23


DirectiveArgs#

Ƭ DirectiveArgs: object

Type declaration#

Defined in: packages/utils/src/get-fields-with-directives.ts:11


DirectiveMapper#

Ƭ DirectiveMapper: (directive: GraphQLDirective, schema: GraphQLSchema) => GraphQLDirective | null | undefined

Type declaration#

▸ (directive: GraphQLDirective, schema: GraphQLSchema): GraphQLDirective | null | undefined

Parameters#

NameType
directiveGraphQLDirective
schemaGraphQLSchema

Returns: GraphQLDirective | null | undefined

Defined in: packages/utils/src/Interfaces.ts:499


DirectiveResolverFn#

Ƭ DirectiveResolverFn<TSource, TContext\>: (next: NextResolverFn, source: TSource, args: { [argName: string]: any; }, context: TContext, info: GraphQLResolveInfo) => any

Type parameters#

NameDefault
TSourceany
TContextany

Type declaration#

▸ (next: NextResolverFn, source: TSource, args: { [argName: string]: any; }, context: TContext, info: GraphQLResolveInfo): any

Parameters#

NameType
nextNextResolverFn
sourceTSource
argsobject
contextTContext
infoGraphQLResolveInfo

Returns: any

Defined in: packages/utils/src/Interfaces.ts:301


DirectiveUsage#

Ƭ DirectiveUsage: object

Type declaration#

NameType
argsDirectiveArgs
namestring

Defined in: packages/utils/src/get-fields-with-directives.ts:12


DirectiveUseMap#

Ƭ DirectiveUseMap: object

Type declaration#

Defined in: packages/utils/src/get-directives.ts:29


DocumentGlobPathPointer#

Ƭ DocumentGlobPathPointer: string

Defined in: packages/utils/src/loaders.ts:22


DocumentLoader#

Ƭ DocumentLoader<TOptions\>: Loader<DocumentPointerSingle, TOptions\>

Type parameters#

NameTypeDefault
TOptionsSingleFileOptionsSingleFileOptions

Defined in: packages/utils/src/loaders.ts:39


DocumentPointer#

Ƭ DocumentPointer: WithList<DocumentGlobPathPointer\>

Defined in: packages/utils/src/loaders.ts:23


DocumentPointerSingle#

Ƭ DocumentPointerSingle: ElementOf<DocumentPointer\>

Defined in: packages/utils/src/loaders.ts:24


ElementOf#

Ƭ ElementOf<TList\>: TList extends infer TElement[] ? TElement : never

Type parameters#

Name
TList

Defined in: packages/utils/src/loaders.ts:19


EnumTypeMapper#

Ƭ EnumTypeMapper: (type: GraphQLEnumType, schema: GraphQLSchema) => GraphQLEnumType | null | undefined

Type declaration#

▸ (type: GraphQLEnumType, schema: GraphQLSchema): GraphQLEnumType | null | undefined

Parameters#

NameType
typeGraphQLEnumType
schemaGraphQLSchema

Returns: GraphQLEnumType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:466


EnumTypeVisitor#

Ƭ EnumTypeVisitor: (type: GraphQLEnumType, schema: GraphQLSchema) => GraphQLEnumType | null | undefined

Type declaration#

▸ (type: GraphQLEnumType, schema: GraphQLSchema): GraphQLEnumType | null | undefined

Parameters#

NameType
typeGraphQLEnumType
schemaGraphQLSchema

Returns: GraphQLEnumType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:377


EnumValueMapper#

Ƭ EnumValueMapper: (valueConfig: GraphQLEnumValueConfig, typeName: string, schema: GraphQLSchema, externalValue: string) => GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined

Type declaration#

▸ (valueConfig: GraphQLEnumValueConfig, typeName: string, schema: GraphQLSchema, externalValue: string): GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined

Parameters#

NameType
valueConfigGraphQLEnumValueConfig
typeNamestring
schemaGraphQLSchema
externalValuestring

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

Defined in: packages/utils/src/Interfaces.ts:468


ErrorVisitor#

Ƭ ErrorVisitor: (error: GraphQLError, pathIndex: number) => GraphQLError

Type declaration#

▸ (error: GraphQLError, pathIndex: number): GraphQLError

Parameters#

NameType
errorGraphQLError
pathIndexnumber

Returns: GraphQLError

Defined in: packages/utils/src/visitResult.ts:30


ErrorVisitorMap#

Ƭ ErrorVisitorMap: { __unpathed?: (error: GraphQLError) => GraphQLError } & Record<string, Record<string, ErrorVisitor\>\>

Defined in: packages/utils/src/visitResult.ts:32


FieldFilter#

Ƭ FieldFilter: (typeName?: string, fieldName?: string, fieldConfig?: GraphQLFieldConfig<any, any\> | GraphQLInputFieldConfig) => boolean

Type declaration#

▸ (typeName?: string, fieldName?: string, fieldConfig?: GraphQLFieldConfig<any, any\> | GraphQLInputFieldConfig): boolean

Parameters#

NameType
typeName?string
fieldName?string
fieldConfig?GraphQLFieldConfig<any, any\> | GraphQLInputFieldConfig

Returns: boolean

Defined in: packages/utils/src/Interfaces.ts:201


FieldMapper#

Ƭ FieldMapper: GenericFieldMapper<GraphQLFieldConfig<any, any\>\>

Defined in: packages/utils/src/Interfaces.ts:511


FieldNodeMapper#

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

Type declaration#

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

Parameters#

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

Returns: SelectionNode | SelectionNode[]

Defined in: packages/utils/src/Interfaces.ts:187


FieldNodeMappers#

Ƭ FieldNodeMappers: Record<string, Record<string, FieldNodeMapper\>\>

Defined in: packages/utils/src/Interfaces.ts:193


Force#

Ƭ Force: string[]

Defined in: packages/utils/src/build-operation-for-field.ts:52


GenericFieldMapper#

Ƭ GenericFieldMapper<F\>: (fieldConfig: F, fieldName: string, typeName: string, schema: GraphQLSchema) => F | [string, F] | null | undefined

Type parameters#

NameType
FGraphQLFieldConfig<any, any\> | GraphQLInputFieldConfig

Type declaration#

▸ (fieldConfig: F, fieldName: string, typeName: string, schema: GraphQLSchema): F | [string, F] | null | undefined

Parameters#

NameType
fieldConfigF
fieldNamestring
typeNamestring
schemaGraphQLSchema

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

Defined in: packages/utils/src/Interfaces.ts:504


IDefaultValueIteratorFn#

Ƭ IDefaultValueIteratorFn: (type: GraphQLInputType, value: any) => void

Type declaration#

▸ (type: GraphQLInputType, value: any): void

Parameters#

NameType
typeGraphQLInputType
valueany

Returns: void

Defined in: packages/utils/src/Interfaces.ts:297


IEnumTypeResolver#

Ƭ IEnumTypeResolver: Record<string, any\> & { __astNode?: EnumTypeDefinitionNode ; __description?: string ; __extensionASTNodes?: EnumTypeExtensionNode[] ; __extensions?: Record<string, any\> ; __name?: string }

Defined in: packages/utils/src/Interfaces.ts:166


IFieldIteratorFn#

Ƭ IFieldIteratorFn: (fieldDef: GraphQLField<any, any\>, typeName: string, fieldName: string) => void

Type declaration#

▸ (fieldDef: GraphQLField<any, any\>, typeName: string, fieldName: string): void

Parameters#

NameType
fieldDefGraphQLField<any, any\>
typeNamestring
fieldNamestring

Returns: void

Defined in: packages/utils/src/Interfaces.ts:295


IFieldResolver#

Ƭ IFieldResolver<TSource, TContext, TArgs, TReturn\>: (source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TReturn

Type parameters#

NameDefault
TSource-
TContext-
TArgsRecord<string, any\>
TReturnany

Type declaration#

▸ (source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo): TReturn

Parameters#

NameType
sourceTSource
argsTArgs
contextTContext
infoGraphQLResolveInfo

Returns: TReturn

Defined in: packages/utils/src/Interfaces.ts:227


IInputObjectTypeResolver#

Ƭ IInputObjectTypeResolver: object

Type declaration#

NameType
__astNode?InputObjectTypeDefinitionNode
__description?string
__extensionASTNodes?InputObjectTypeExtensionNode[]
__extensions?Record<string, any\>
__name?string

Defined in: packages/utils/src/Interfaces.ts:269


IInterfaceTypeResolver#

Ƭ IInterfaceTypeResolver<TSource, TContext, TArgs\>: { [key: string]: IFieldResolver<TSource, TContext, TArgs\> | IFieldResolverOptions<TSource, TContext\>; } & { __astNode?: InterfaceTypeDefinitionNode ; __description?: string ; __extensionASTNodes?: InterfaceTypeExtensionNode[] ; __extensions?: Record<string, any\> ; __name?: string ; __resolveType?: GraphQLTypeResolver<any, any\> }

Type parameters#

NameDefault
TSourceany
TContextany
TArgsany

Defined in: packages/utils/src/Interfaces.ts:249


IObjectTypeResolver#

Ƭ IObjectTypeResolver<TSource, TContext, TArgs\>: { [key: string]: IFieldResolver<TSource, TContext, TArgs\> | IFieldResolverOptions<TSource, TContext\>; } & { __astNode?: ObjectTypeDefinitionNode ; __description?: string ; __extensionASTNodes?: ObjectTypeExtensionNode ; __extensions?: Record<string, any\> ; __isTypeOf?: GraphQLIsTypeOfFn<TSource, TContext\> ; __name?: string }

Type parameters#

NameDefault
TSourceany
TContextany
TArgsany

Defined in: packages/utils/src/Interfaces.ts:238


IResolvers#

Ƭ IResolvers<TSource, TContext, TArgs, TReturn\>: Record<string, ISchemaLevelResolver<TSource, TContext, TArgs, TReturn\> | IObjectTypeResolver<TSource, TContext\> | IInterfaceTypeResolver<TSource, TContext\> | IUnionTypeResolver | IScalarTypeResolver | IEnumTypeResolver | IInputObjectTypeResolver\>

Type parameters#

NameDefault
TSourceany
TContextany
TArgsRecord<string, any\>
TReturnany

Defined in: packages/utils/src/Interfaces.ts:284


IScalarTypeResolver#

Ƭ IScalarTypeResolver: GraphQLScalarType & { __astNode?: ScalarTypeDefinitionNode ; __description?: string ; __extensionASTNodes?: ScalarTypeExtensionNode[] ; __extensions?: Record<string, any\> ; __name?: string ; __parseLiteral?: GraphQLScalarLiteralParser<any\> ; __parseValue?: GraphQLScalarValueParser<any\> ; __serialize?: GraphQLScalarSerializer<any\> }

Defined in: packages/utils/src/Interfaces.ts:155


ISchemaLevelResolver#

Ƭ ISchemaLevelResolver<TSource, TContext, TArgs, TReturn\>: IFieldResolver<TSource, TContext, TArgs, TReturn\>

Type parameters#

NameDefault
TSource-
TContext-
TArgsRecord<string, any\>
TReturnany

Defined in: packages/utils/src/Interfaces.ts:277


ITypeDefinitions#

Ƭ ITypeDefinitions: string | DocumentNode | ITypedef[]

Defined in: packages/utils/src/Interfaces.ts:236


ITypedef#

Ƭ ITypedef: string | DocumentNode | () => ITypedef[]

Defined in: packages/utils/src/Interfaces.ts:234


IUnionTypeResolver#

Ƭ IUnionTypeResolver: object

Type declaration#

NameType
__astNode?UnionTypeDefinitionNode
__description?string
__extensionASTNodes?UnionTypeExtensionNode[]
__extensions?Record<string, any\>
__name?string
__resolveType?GraphQLTypeResolver<any, any\>

Defined in: packages/utils/src/Interfaces.ts:260


Ignore#

Ƭ Ignore: string[]

Defined in: packages/utils/src/build-operation-for-field.ts:53


InputFieldFilter#

Ƭ InputFieldFilter: (typeName?: string, fieldName?: string, inputFieldConfig?: GraphQLInputFieldConfig) => boolean

Type declaration#

▸ (typeName?: string, fieldName?: string, inputFieldConfig?: GraphQLInputFieldConfig): boolean

Parameters#

NameType
typeName?string
fieldName?string
inputFieldConfig?GraphQLInputFieldConfig

Returns: boolean

Defined in: packages/utils/src/Interfaces.ts:195


InputFieldMapper#

Ƭ InputFieldMapper: GenericFieldMapper<GraphQLInputFieldConfig\>

Defined in: packages/utils/src/Interfaces.ts:520


InputLeafValueTransformer#

Ƭ InputLeafValueTransformer: (type: GraphQLEnumType | GraphQLScalarType, originalValue: any) => any

Type declaration#

▸ (type: GraphQLEnumType | GraphQLScalarType, originalValue: any): any

Parameters#

NameType
typeGraphQLEnumType | GraphQLScalarType
originalValueany

Returns: any

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


InputObjectTypeMapper#

Ƭ InputObjectTypeMapper: (type: GraphQLInputObjectType, schema: GraphQLSchema) => GraphQLInputObjectType | null | undefined

Type declaration#

▸ (type: GraphQLInputObjectType, schema: GraphQLSchema): GraphQLInputObjectType | null | undefined

Parameters#

NameType
typeGraphQLInputObjectType
schemaGraphQLSchema

Returns: GraphQLInputObjectType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:482


InputObjectTypeVisitor#

Ƭ InputObjectTypeVisitor: (type: GraphQLInputObjectType, schema: GraphQLSchema) => GraphQLInputObjectType | null | undefined

Type declaration#

▸ (type: GraphQLInputObjectType, schema: GraphQLSchema): GraphQLInputObjectType | null | undefined

Parameters#

NameType
typeGraphQLInputObjectType
schemaGraphQLSchema

Returns: GraphQLInputObjectType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:389


InputObjectValueTransformer#

Ƭ InputObjectValueTransformer: (type: GraphQLInputObjectType, originalValue: Record<string, any\>) => Record<string, any\>

Type declaration#

▸ (type: GraphQLInputObjectType, originalValue: Record<string, any\>): Record<string, any\>

Parameters#

NameType
typeGraphQLInputObjectType
originalValueRecord<string, any\>

Returns: Record<string, any\>

Defined in: packages/utils/src/types.ts:57


InterfaceTypeMapper#

Ƭ InterfaceTypeMapper: (type: GraphQLInterfaceType, schema: GraphQLSchema) => GraphQLInterfaceType | null | undefined

Type declaration#

▸ (type: GraphQLInterfaceType, schema: GraphQLSchema): GraphQLInterfaceType | null | undefined

Parameters#

NameType
typeGraphQLInterfaceType
schemaGraphQLSchema

Returns: GraphQLInterfaceType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:494


InterfaceTypeVisitor#

Ƭ InterfaceTypeVisitor: (type: GraphQLInterfaceType, schema: GraphQLSchema) => GraphQLInterfaceType | null | undefined

Type declaration#

▸ (type: GraphQLInterfaceType, schema: GraphQLSchema): GraphQLInterfaceType | null | undefined

Parameters#

NameType
typeGraphQLInterfaceType
schemaGraphQLSchema

Returns: GraphQLInterfaceType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:401


Maybe#

Ƭ Maybe<T\>: null | undefined | T

Type parameters#

Name
T

Defined in: packages/utils/src/types.ts:21


NamedTypeMapper#

Ƭ NamedTypeMapper: (type: GraphQLNamedType, schema: GraphQLSchema) => GraphQLNamedType | null | undefined

Type declaration#

▸ (type: GraphQLNamedType, schema: GraphQLSchema): GraphQLNamedType | null | undefined

Parameters#

NameType
typeGraphQLNamedType
schemaGraphQLSchema

Returns: GraphQLNamedType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:462


NamedTypeVisitor#

Ƭ NamedTypeVisitor: (type: GraphQLNamedType, schema: GraphQLSchema) => GraphQLNamedType | null | undefined

Type declaration#

▸ (type: GraphQLNamedType, schema: GraphQLSchema): GraphQLNamedType | null | undefined

Parameters#

NameType
typeGraphQLNamedType
schemaGraphQLSchema

Returns: GraphQLNamedType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:370


NextResolverFn#

Ƭ NextResolverFn: () => Promise<any\>

Type declaration#

▸ (): Promise<any\>

Returns: Promise<any\>

Defined in: packages/utils/src/Interfaces.ts:299


ObjectTypeMapper#

Ƭ ObjectTypeMapper: (type: GraphQLObjectType, schema: GraphQLSchema) => GraphQLObjectType | null | undefined

Type declaration#

▸ (type: GraphQLObjectType, schema: GraphQLSchema): GraphQLObjectType | null | undefined

Parameters#

NameType
typeGraphQLObjectType
schemaGraphQLSchema

Returns: GraphQLObjectType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:480


ObjectTypeVisitor#

Ƭ ObjectTypeVisitor: (type: GraphQLObjectType, schema: GraphQLSchema) => GraphQLObjectType | null | undefined

Type declaration#

▸ (type: GraphQLObjectType, schema: GraphQLSchema): GraphQLObjectType | null | undefined

Parameters#

NameType
typeGraphQLObjectType
schemaGraphQLSchema

Returns: GraphQLObjectType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:384


ObjectValueVisitor#

Ƭ ObjectValueVisitor: { __enter?: ValueVisitor ; __leave?: ValueVisitor } & Record<string, ValueVisitor\>

Defined in: packages/utils/src/visitResult.ts:23


PrintSchemaWithDirectivesOptions#

Ƭ PrintSchemaWithDirectivesOptions: SchemaPrintOptions & GetDocumentNodeFromSchemaOptions

Defined in: packages/utils/src/types.ts:19


PruneSchemaFilter#

Ƭ PruneSchemaFilter: (type: GraphQLNamedType) => boolean

Type declaration#

▸ (type: GraphQLNamedType): boolean

Parameters#

NameType
typeGraphQLNamedType

Returns: boolean

Defined in: packages/utils/src/types.ts:25


RenameTypesOptions#

Ƭ RenameTypesOptions: object

Type declaration#

NameType
renameBuiltinsboolean
renameScalarsboolean

Defined in: packages/utils/src/Interfaces.ts:222


ResultVisitorMap#

Ƭ ResultVisitorMap: Record<string, ValueVisitor | ObjectValueVisitor\>

Defined in: packages/utils/src/visitResult.ts:28


RootFieldFilter#

Ƭ RootFieldFilter: (operation?: "Query" | "Mutation" | "Subscription", rootFieldName?: string, fieldConfig?: GraphQLFieldConfig<any, any\>) => boolean

Type declaration#

▸ (operation?: "Query" | "Mutation" | "Subscription", rootFieldName?: string, fieldConfig?: GraphQLFieldConfig<any, any\>): boolean

Parameters#

NameType
operation?"Query" | "Mutation" | "Subscription"
rootFieldName?string
fieldConfig?GraphQLFieldConfig<any, any\>

Returns: boolean

Defined in: packages/utils/src/Interfaces.ts:207


ScalarTypeMapper#

Ƭ ScalarTypeMapper: (type: GraphQLScalarType, schema: GraphQLSchema) => GraphQLScalarType | null | undefined

Type declaration#

▸ (type: GraphQLScalarType, schema: GraphQLSchema): GraphQLScalarType | null | undefined

Parameters#

NameType
typeGraphQLScalarType
schemaGraphQLSchema

Returns: GraphQLScalarType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:464


ScalarTypeVisitor#

Ƭ ScalarTypeVisitor: (type: GraphQLScalarType, schema: GraphQLSchema) => GraphQLScalarType | null | undefined

Type declaration#

▸ (type: GraphQLScalarType, schema: GraphQLSchema): GraphQLScalarType | null | undefined

Parameters#

NameType
typeGraphQLScalarType
schemaGraphQLSchema

Returns: GraphQLScalarType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:372


SchemaDirectiveVisitorClass#

Ƭ SchemaDirectiveVisitorClass: typeof SchemaDirectiveVisitor

Defined in: packages/utils/src/SchemaDirectiveVisitor.ts:321


SchemaLoader#

Ƭ SchemaLoader<TOptions\>: Loader<SchemaPointerSingle, TOptions\>

Type parameters#

NameTypeDefault
TOptionsSingleFileOptionsSingleFileOptions

Defined in: packages/utils/src/loaders.ts:34


SchemaPointer#

Ƭ SchemaPointer: WithList<string\>

Defined in: packages/utils/src/loaders.ts:20


SchemaPointerSingle#

Ƭ SchemaPointerSingle: ElementOf<SchemaPointer\>

Defined in: packages/utils/src/loaders.ts:21


SelectedFields#

Ƭ SelectedFields: { [key: string]: SelectedFields; } | boolean

Defined in: packages/utils/src/build-operation-for-field.ts:55


SingleFileOptions#

Ƭ SingleFileOptions: GraphQLParseOptions & GraphQLSchemaValidationOptions & BuildSchemaOptions & { cwd?: string }

Defined in: packages/utils/src/loaders.ts:12


Skip#

Ƭ Skip: string[]

Defined in: packages/utils/src/build-operation-for-field.ts:51


TypeAndFieldToDirectives#

Ƭ TypeAndFieldToDirectives: object

Type declaration#

Defined in: packages/utils/src/get-fields-with-directives.ts:13


TypeFilter#

Ƭ TypeFilter: (typeName: string, type: GraphQLType) => boolean

Type declaration#

▸ (typeName: string, type: GraphQLType): boolean

Parameters#

NameType
typeNamestring
typeGraphQLType

Returns: boolean

Defined in: packages/utils/src/Interfaces.ts:213


TypeMap#

Ƭ TypeMap: Record<string, GraphQLNamedType\>

Defined in: packages/utils/src/Interfaces.ts:63


UnionTypeMapper#

Ƭ UnionTypeMapper: (type: GraphQLUnionType, schema: GraphQLSchema) => GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLUnionType, schema: GraphQLSchema): GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:492


UnionTypeVisitor#

Ƭ UnionTypeVisitor: (type: GraphQLUnionType, schema: GraphQLSchema) => GraphQLUnionType | null | undefined

Type declaration#

▸ (type: GraphQLUnionType, schema: GraphQLSchema): GraphQLUnionType | null | undefined

Parameters#

NameType
typeGraphQLUnionType
schemaGraphQLSchema

Returns: GraphQLUnionType | null | undefined

Defined in: packages/utils/src/Interfaces.ts:399


UniversalLoader#

Ƭ UniversalLoader<TOptions\>: Loader<SchemaPointerSingle | DocumentPointerSingle, TOptions\>

Type parameters#

NameTypeDefault
TOptionsSingleFileOptionsSingleFileOptions

Defined in: packages/utils/src/loaders.ts:44


ValidationRule#

Ƭ ValidationRule: (context: ValidationContext) => ASTVisitor

Type declaration#

▸ (context: ValidationContext): ASTVisitor

Parameters#

NameType
contextValidationContext

Returns: ASTVisitor

Defined in: packages/utils/src/validate-documents.ts:14


ValidatorBehavior#

Ƭ ValidatorBehavior: "error" | "warn" | "ignore"

Defined in: packages/utils/src/Interfaces.ts:91


ValueVisitor#

Ƭ ValueVisitor: (value: any) => any

Type declaration#

▸ (value: any): any

Parameters#

NameType
valueany

Returns: any

Defined in: packages/utils/src/visitResult.ts:21


VisitableSchemaType#

Ƭ VisitableSchemaType: GraphQLSchema | GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType | GraphQLNamedType | GraphQLScalarType | GraphQLField<any, any\> | GraphQLInputField | GraphQLArgument | GraphQLUnionType | GraphQLEnumType | GraphQLEnumValue

Defined in: packages/utils/src/Interfaces.ts:319


VisitorSelector#

Ƭ VisitorSelector: (type: VisitableSchemaType, methodName: string) => (SchemaVisitor | SchemaVisitorMap)[]

Type declaration#

▸ (type: VisitableSchemaType, methodName: string): (SchemaVisitor | SchemaVisitorMap)[]

Parameters#

NameType
typeVisitableSchemaType
methodNamestring

Returns: (SchemaVisitor | SchemaVisitorMap)[]

Defined in: packages/utils/src/Interfaces.ts:333


WithList#

Ƭ WithList<T\>: T | T[]

Type parameters#

Name
T

Defined in: packages/utils/src/loaders.ts:18

Functions#

addTypes#

addTypes(schema: GraphQLSchema, newTypesOrDirectives: (GraphQLNamedType | GraphQLDirective)[]): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema
newTypesOrDirectives(GraphQLNamedType | GraphQLDirective)[]

Returns: GraphQLSchema

Defined in: packages/utils/src/addTypes.ts:39


appendObjectFields#

appendObjectFields(schema: GraphQLSchema, typeName: string, additionalFields: GraphQLFieldConfigMap<any, any\>): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema
typeNamestring
additionalFieldsGraphQLFieldConfigMap<any, any\>

Returns: GraphQLSchema

Defined in: packages/utils/src/fields.ts:6


argsToFieldConfigArgumentMap#

argsToFieldConfigArgumentMap(args: ReadonlyArray<GraphQLArgument\>): GraphQLFieldConfigArgumentMap

Parameters#

NameType
argsReadonlyArray<GraphQLArgument\>

Returns: GraphQLFieldConfigArgumentMap

Defined in: packages/utils/src/toConfig.ts:34


argumentToArgumentConfig#

argumentToArgumentConfig(arg: GraphQLArgument): GraphQLArgumentConfig

Parameters#

NameType
argGraphQLArgument

Returns: GraphQLArgumentConfig

Defined in: packages/utils/src/toConfig.ts:43


asArray#

Const asArray<T\>(fns: T | T[]): T[]

Type parameters#

Name
T

Parameters#

NameType
fnsT | T[]

Returns: T[]

Defined in: packages/utils/src/helpers.ts:3


astFromArg#

astFromArg(arg: GraphQLArgument, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): InputValueDefinitionNode

Parameters#

NameType
argGraphQLArgument
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: InputValueDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:291


astFromDirective#

astFromDirective(directive: GraphQLDirective, schema?: GraphQLSchema, pathToDirectivesInExtensions?: string[]): DirectiveDefinitionNode

Parameters#

NameType
directiveGraphQLDirective
schema?GraphQLSchema
pathToDirectivesInExtensions?string[]

Returns: DirectiveDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:194


astFromEnumType#

astFromEnumType(type: GraphQLEnumType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): EnumTypeDefinitionNode

Parameters#

NameType
typeGraphQLEnumType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: EnumTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:423


astFromEnumValue#

astFromEnumValue(value: GraphQLEnumValue, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): EnumValueDefinitionNode

Parameters#

NameType
valueGraphQLEnumValue
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: EnumValueDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:550


astFromField#

astFromField(field: GraphQLField<any, any\>, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): FieldDefinitionNode

Parameters#

NameType
fieldGraphQLField<any, any\>
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: FieldDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:500


astFromInputField#

astFromInputField(field: GraphQLInputField, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): InputValueDefinitionNode

Parameters#

NameType
fieldGraphQLInputField
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: InputValueDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:525


astFromInputObjectType#

astFromInputObjectType(type: GraphQLInputObjectType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): InputObjectTypeDefinitionNode

Parameters#

NameType
typeGraphQLInputObjectType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: InputObjectTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:397


astFromInterfaceType#

astFromInterfaceType(type: GraphQLInterfaceType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): InterfaceTypeDefinitionNode

Parameters#

NameType
typeGraphQLInterfaceType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: InterfaceTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:341


astFromObjectType#

astFromObjectType(type: GraphQLObjectType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): ObjectTypeDefinitionNode

Parameters#

NameType
typeGraphQLObjectType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: ObjectTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:316


astFromScalarType#

astFromScalarType(type: GraphQLScalarType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): ScalarTypeDefinitionNode

Parameters#

NameType
typeGraphQLScalarType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: ScalarTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:447


astFromSchema#

astFromSchema(schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): SchemaDefinitionNode | SchemaExtensionNode

Parameters#

NameType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: SchemaDefinitionNode | SchemaExtensionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:119


astFromUnionType#

astFromUnionType(type: GraphQLUnionType, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): UnionTypeDefinitionNode

Parameters#

NameType
typeGraphQLUnionType
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: UnionTypeDefinitionNode

Defined in: packages/utils/src/print-schema-with-directives.ts:373


astFromValueUntyped#

astFromValueUntyped(value: any): ValueNode

Produces a GraphQL Value AST given a JavaScript object. Function will match JavaScript/JSON values to GraphQL AST schema format by using the following mapping.

JSON ValueGraphQL Value
ObjectInput Object
ArrayList
BooleanBoolean
StringString
NumberInt / Float
nullNullValue

Parameters#

NameType
valueany

Returns: ValueNode

Defined in: packages/utils/src/astFromValueUntyped.ts:18


buildOperationNodeForField#

buildOperationNodeForField(__namedParameters: { argNames?: string[] ; circularReferenceDepth?: number ; depthLimit?: number ; field: string ; ignore?: Ignore ; kind: OperationTypeNode ; models?: string[] ; schema: GraphQLSchema ; selectedFields?: SelectedFields }): OperationDefinitionNode

Parameters#

NameType
__namedParametersobject
__namedParameters.argNames?string[]
__namedParameters.circularReferenceDepth?number
__namedParameters.depthLimit?number
__namedParameters.fieldstring
__namedParameters.ignore?Ignore
__namedParameters.kindOperationTypeNode
__namedParameters.models?string[]
__namedParameters.schemaGraphQLSchema
__namedParameters.selectedFields?SelectedFields

Returns: OperationDefinitionNode

Defined in: packages/utils/src/build-operation-for-field.ts:61


checkValidationErrors#

checkValidationErrors(loadDocumentErrors: ReadonlyArray<LoadDocumentError\>): void | never

Parameters#

NameType
loadDocumentErrorsReadonlyArray<LoadDocumentError\>

Returns: void | never

Defined in: packages/utils/src/validate-documents.ts:75


cloneDirective#

cloneDirective(directive: GraphQLDirective): GraphQLDirective

Parameters#

NameType
directiveGraphQLDirective

Returns: GraphQLDirective

Defined in: packages/utils/src/clone.ts:23


cloneSchema#

cloneSchema(schema: GraphQLSchema): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema

Returns: GraphQLSchema

Defined in: packages/utils/src/clone.ts:58


cloneType#

cloneType(type: GraphQLNamedType): GraphQLNamedType

Parameters#

NameType
typeGraphQLNamedType

Returns: GraphQLNamedType

Defined in: packages/utils/src/clone.ts:27


collectFields#

collectFields(exeContext: GraphQLExecutionContext, runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: Record<string, FieldNode[]\>, visitedFragmentNames: Record<string, boolean\>): Record<string, FieldNode[]\>

Given a selectionSet, adds all of the fields in that selection to the passed in map of fields, and returns it at the end.

CollectFields requires the "runtime type" of an object. For a field which returns an Interface or Union type, the "runtime type" will be the actual Object type returned by that field.

internal

Parameters#

NameType
exeContextGraphQLExecutionContext
runtimeTypeGraphQLObjectType
selectionSetSelectionSetNode
fieldsRecord<string, FieldNode[]\>
visitedFragmentNamesRecord<string, boolean\>

Returns: Record<string, FieldNode[]\>

Defined in: packages/utils/src/collectFields.ts:28


compareNodes#

compareNodes(a: ASTNode, b: ASTNode, customFn?: (a: any, b: any) => number): number

Parameters#

NameType
aASTNode
bASTNode
customFn?(a: any, b: any) => number

Returns: number

Defined in: packages/utils/src/helpers.ts:74


compareStrings#

compareStrings<A, B\>(a: A, b: B): 0 | 1 | -1

Type parameters#

Name
A
B

Parameters#

NameType
aA
bB

Returns: 0 | 1 | -1

Defined in: packages/utils/src/helpers.ts:50


correctASTNodes#

correctASTNodes(type: GraphQLObjectType): GraphQLObjectType

Parameters#

NameType
typeGraphQLObjectType

Returns: GraphQLObjectType

Defined in: packages/utils/src/mapSchema.ts:497

correctASTNodes(type: GraphQLInterfaceType): GraphQLInterfaceType

Parameters#

NameType
typeGraphQLInterfaceType

Returns: GraphQLInterfaceType

Defined in: packages/utils/src/mapSchema.ts:498

correctASTNodes(type: GraphQLInputObjectType): GraphQLInputObjectType

Parameters#

NameType
typeGraphQLInputObjectType

Returns: GraphQLInputObjectType

Defined in: packages/utils/src/mapSchema.ts:499

correctASTNodes(type: GraphQLEnumType): GraphQLEnumType

Parameters#

NameType
typeGraphQLEnumType

Returns: GraphQLEnumType

Defined in: packages/utils/src/mapSchema.ts:500


createNamedStub#

createNamedStub(name: string, type: "object"): GraphQLObjectType

Parameters#

NameType
namestring
type"object"

Returns: GraphQLObjectType

Defined in: packages/utils/src/stub.ts:23

createNamedStub(name: string, type: "interface"): GraphQLInterfaceType

Parameters#

NameType
namestring
type"interface"

Returns: GraphQLInterfaceType

Defined in: packages/utils/src/stub.ts:24

createNamedStub(name: string, type: "input"): GraphQLInputObjectType

Parameters#

NameType
namestring
type"input"

Returns: GraphQLInputObjectType

Defined in: packages/utils/src/stub.ts:25


createSchemaDefinition#

createSchemaDefinition(def: { mutation: string | GraphQLObjectType | null ; query: string | GraphQLObjectType | null ; subscription: string | GraphQLObjectType | null }, config?: { force?: boolean }): string

Parameters#

NameType
defobject
def.mutationstring | GraphQLObjectType | null
def.querystring | GraphQLObjectType | null
def.subscriptionstring | GraphQLObjectType | null
config?object
config.force?boolean

Returns: string

Defined in: packages/utils/src/create-schema-definition.ts:3


createStub#

createStub(node: TypeNode, type: "output"): GraphQLOutputType

Parameters#

NameType
nodeTypeNode
type"output"

Returns: GraphQLOutputType

Defined in: packages/utils/src/stub.ts:49

createStub(node: TypeNode, type: "input"): GraphQLInputType

Parameters#

NameType
nodeTypeNode
type"input"

Returns: GraphQLInputType

Defined in: packages/utils/src/stub.ts:50

createStub(node: TypeNode, type: "output" | "input"): GraphQLType

Parameters#

NameType
nodeTypeNode
type"output" | "input"

Returns: GraphQLType

Defined in: packages/utils/src/stub.ts:51


debugLog#

debugLog(...args: any[]): void

Parameters#

NameType
...argsany[]

Returns: void

Defined in: packages/utils/src/debug-log.ts:1


fieldToFieldConfig#

fieldToFieldConfig(field: GraphQLField<any, any\>): GraphQLFieldConfig<any, any\>

Parameters#

NameType
fieldGraphQLField<any, any\>

Returns: GraphQLFieldConfig<any, any\>

Defined in: packages/utils/src/toConfig.ts:21


filterSchema#

filterSchema(__namedParameters: { argumentFilter?: ArgumentFilter ; fieldFilter?: FieldFilter ; inputObjectFieldFilter?: FieldFilter ; interfaceFieldFilter?: FieldFilter ; objectFieldFilter?: FieldFilter ; rootFieldFilter?: RootFieldFilter ; schema: GraphQLSchema ; typeFilter?: TypeFilter }): GraphQLSchema

Parameters#

NameType
__namedParametersobject
__namedParameters.argumentFilter?ArgumentFilter
__namedParameters.fieldFilter?FieldFilter
__namedParameters.inputObjectFieldFilter?FieldFilter
__namedParameters.interfaceFieldFilter?FieldFilter
__namedParameters.objectFieldFilter?FieldFilter
__namedParameters.rootFieldFilter?RootFieldFilter
__namedParameters.schemaGraphQLSchema
__namedParameters.typeFilter?TypeFilter

Returns: GraphQLSchema

Defined in: packages/utils/src/filterSchema.ts:17


fixSchemaAst#

fixSchemaAst(schema: GraphQLSchema, options: BuildSchemaOptions & SchemaPrintOptions): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema
optionsBuildSchemaOptions & SchemaPrintOptions

Returns: GraphQLSchema

Defined in: packages/utils/src/fix-schema-ast.ts:12


fixWindowsPath#

Const fixWindowsPath(path: string): string

Parameters#

NameType
pathstring

Returns: string

Defined in: packages/utils/src/fix-windows-path.ts:1


flattenArray#

Const flattenArray(arr: any): any[]

Parameters#

NameType
arrany

Returns: any[]

Defined in: packages/utils/src/flatten-array.ts:1


forEachDefaultValue#

forEachDefaultValue(schema: GraphQLSchema, fn: IDefaultValueIteratorFn): void

Parameters#

NameType
schemaGraphQLSchema
fnIDefaultValueIteratorFn

Returns: void

Defined in: packages/utils/src/forEachDefaultValue.ts:5


forEachField#

forEachField(schema: GraphQLSchema, fn: IFieldIteratorFn): void

Parameters#

NameType
schemaGraphQLSchema
fnIFieldIteratorFn

Returns: void

Defined in: packages/utils/src/forEachField.ts:5


getArgumentValues#

getArgumentValues(def: GraphQLField<any, any\> | GraphQLDirective, node: FieldNode | DirectiveNode, variableValues?: Record<string, any\>): Record<string, any\>

Prepares an object map of argument values given a list of argument definitions and list of argument AST nodes.

Note: The returned value is a plain Object with a prototype, since it is exposed to user code. Care should be taken to not pull values from the Object prototype.

Parameters#

NameTypeDefault value
defGraphQLField<any, any\> | GraphQLDirective-
nodeFieldNode | DirectiveNode-
variableValuesRecord<string, any\>{}

Returns: Record<string, any\>

Defined in: packages/utils/src/getArgumentValues.ts:24


getBuiltInForStub#

getBuiltInForStub(type: GraphQLNamedType): GraphQLNamedType

Parameters#

NameType
typeGraphQLNamedType

Returns: GraphQLNamedType

Defined in: packages/utils/src/stub.ts:76


getDeprecatableDirectiveNodes#

getDeprecatableDirectiveNodes(entity: GraphQLArgument | GraphQLField<any, any\> | GraphQLInputField, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): DirectiveNode[]

Parameters#

NameType
entityGraphQLArgument | GraphQLField<any, any\> | GraphQLInputField
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: DirectiveNode[]

Defined in: packages/utils/src/print-schema-with-directives.ts:253


getDirectiveNodes#

getDirectiveNodes(entity: GraphQLSchema | GraphQLNamedType | GraphQLEnumValue, schema: GraphQLSchema, pathToDirectivesInExtensions: string[]): DirectiveNode[]

Parameters#

NameType
entityGraphQLSchema | GraphQLNamedType | GraphQLEnumValue
schemaGraphQLSchema
pathToDirectivesInExtensionsstring[]

Returns: DirectiveNode[]

Defined in: packages/utils/src/print-schema-with-directives.ts:226


getDirectives#

getDirectives(schema: GraphQLSchema, node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): DirectiveUseMap

Parameters#

NameType
schemaGraphQLSchema
nodeDirectableGraphQLObject
pathToDirectivesInExtensionsstring[]

Returns: DirectiveUseMap

Defined in: packages/utils/src/get-directives.ts:69


getDirectivesInExtensions#

getDirectivesInExtensions(node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): DirectiveUseMap

Parameters#

NameType
nodeDirectableGraphQLObject
pathToDirectivesInExtensionsstring[]

Returns: DirectiveUseMap

Defined in: packages/utils/src/get-directives.ts:57


getDocumentNodeFromSchema#

getDocumentNodeFromSchema(schema: GraphQLSchema, options?: GetDocumentNodeFromSchemaOptions): DocumentNode

Parameters#

NameTypeDefault value
schemaGraphQLSchema-
optionsGetDocumentNodeFromSchemaOptions{}

Returns: DocumentNode

Defined in: packages/utils/src/print-schema-with-directives.ts:57


getFieldsWithDirectives#

getFieldsWithDirectives(documentNode: DocumentNode, options?: Options): TypeAndFieldToDirectives

Parameters#

NameTypeDefault value
documentNodeDocumentNode-
optionsOptions{}

Returns: TypeAndFieldToDirectives

Defined in: packages/utils/src/get-fields-with-directives.ts:49


getImplementingTypes#

getImplementingTypes(interfaceName: string, schema: GraphQLSchema): string[]

Parameters#

NameType
interfaceNamestring
schemaGraphQLSchema

Returns: string[]

Defined in: packages/utils/src/get-implementing-types.ts:3


getLeadingCommentBlock#

getLeadingCommentBlock(node: ASTNode): void | string

Parameters#

NameType
nodeASTNode

Returns: void | string

Defined in: packages/utils/src/parse-graphql-sdl.ts:53


getResolversFromSchema#

getResolversFromSchema(schema: GraphQLSchema): IResolvers

Parameters#

NameType
schemaGraphQLSchema

Returns: IResolvers

Defined in: packages/utils/src/getResolversFromSchema.ts:14


getResponseKeyFromInfo#

getResponseKeyFromInfo(info: GraphQLResolveInfo): string

Get the key under which the result of this resolver will be placed in the response JSON. Basically, just resolves aliases.

Parameters#

NameTypeDescription
infoGraphQLResolveInfoThe info argument to the resolver.

Returns: string

Defined in: packages/utils/src/getResponseKeyFromInfo.ts:8


getUserTypesFromSchema#

getUserTypesFromSchema(schema: GraphQLSchema): GraphQLObjectType[]

Get all GraphQL types from schema without:

  • Query, Mutation, Subscription objects
  • Internal scalars added by parser

Parameters#

NameType
schemaGraphQLSchema

Returns: GraphQLObjectType[]

Defined in: packages/utils/src/get-user-types-from-schema.ts:11


healSchema#

healSchema(schema: GraphQLSchema): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema

Returns: GraphQLSchema

Defined in: packages/utils/src/heal.ts:54


healTypes#

healTypes(originalTypeMap: Record<string, GraphQLNamedType | null\>, directives: ReadonlyArray<GraphQLDirective\>): void

Parameters#

NameType
originalTypeMapRecord<string, GraphQLNamedType | null\>
directivesReadonlyArray<GraphQLDirective\>

Returns: void

Defined in: packages/utils/src/heal.ts:59


implementsAbstractType#

implementsAbstractType(schema: GraphQLSchema, typeA: GraphQLType, typeB: GraphQLType): boolean

Parameters#

NameType
schemaGraphQLSchema
typeAGraphQLType
typeBGraphQLType

Returns: boolean

Defined in: packages/utils/src/implementsAbstractType.ts:3


inputFieldToFieldConfig#

inputFieldToFieldConfig(field: GraphQLInputField): GraphQLInputFieldConfig

Parameters#

NameType
fieldGraphQLInputField

Returns: GraphQLInputFieldConfig

Defined in: packages/utils/src/toConfig.ts:11


isAsyncIterable#

isAsyncIterable<T\>(value: any): value is AsyncIterableIterator<T\>

Type parameters#

Name
T

Parameters#

NameType
valueany

Returns: value is AsyncIterableIterator<T\>

Defined in: packages/utils/src/isAsyncIterable.ts:1


isDescribable#

isDescribable(node: ASTNode): node is DescribableASTNodes

Parameters#

NameType
nodeASTNode

Returns: node is DescribableASTNodes

Defined in: packages/utils/src/parse-graphql-sdl.ts:131


isDocumentNode#

isDocumentNode(object: any): object is DocumentNode

Parameters#

NameType
objectany

Returns: object is DocumentNode

Defined in: packages/utils/src/isDocumentNode.ts:3


isDocumentString#

isDocumentString(str: string): boolean

Parameters#

NameType
strstring

Returns: boolean

Defined in: packages/utils/src/helpers.ts:27


isEqual#

isEqual<T\>(a: T, b: T): boolean

Type parameters#

Name
T

Parameters#

NameType
aT
bT

Returns: boolean

Defined in: packages/utils/src/helpers.ts:5


isNamedStub#

isNamedStub(type: GraphQLNamedType): boolean

Parameters#

NameType
typeGraphQLNamedType

Returns: boolean

Defined in: packages/utils/src/stub.ts:66


isNotEqual#

isNotEqual<T\>(a: T, b: T): boolean

Type parameters#

Name
T

Parameters#

NameType
aT
bT

Returns: boolean

Defined in: packages/utils/src/helpers.ts:23


isValidPath#

isValidPath(str: string): boolean

Parameters#

NameType
strstring

Returns: boolean

Defined in: packages/utils/src/helpers.ts:46


makeDeprecatedDirective#

makeDeprecatedDirective(deprecationReason: string): DirectiveNode

Parameters#

NameType
deprecationReasonstring

Returns: DirectiveNode

Defined in: packages/utils/src/print-schema-with-directives.ts:573


makeDirectiveNode#

makeDirectiveNode(name: string, args: Record<string, any\>, directive?: GraphQLDirective): DirectiveNode

Parameters#

NameType
namestring
argsRecord<string, any\>
directive?GraphQLDirective

Returns: DirectiveNode

Defined in: packages/utils/src/print-schema-with-directives.ts:577


makeDirectiveNodes#

makeDirectiveNodes(schema: GraphQLSchema, directiveValues: Record<string, any\>): DirectiveNode[]

Parameters#

NameType
schemaGraphQLSchema
directiveValuesRecord<string, any\>

Returns: DirectiveNode[]

Defined in: packages/utils/src/print-schema-with-directives.ts:622


mapAsyncIterator#

mapAsyncIterator<T, U\>(iterator: AsyncIterator<T\>, callback: (value: T) => Promise<U\> | U, rejectCallback?: any): AsyncIterableIterator<U\>

Given an AsyncIterable and a callback function, return an AsyncIterator which produces values mapped via calling the callback function.

Type parameters#

Name
T
U

Parameters#

NameType
iteratorAsyncIterator<T\>
callback(value: T) => Promise<U\> | U
rejectCallback?any

Returns: AsyncIterableIterator<U\>

Defined in: packages/utils/src/mapAsyncIterator.ts:5


mapSchema#

mapSchema(schema: GraphQLSchema, schemaMapper?: SchemaMapper): GraphQLSchema

Parameters#

NameTypeDefault value
schemaGraphQLSchema-
schemaMapperSchemaMapper{}

Returns: GraphQLSchema

Defined in: packages/utils/src/mapSchema.ts:48


mergeDeep#

mergeDeep(target: any, ...sources: any[]): any

Parameters#

NameType
targetany
...sourcesany[]

Returns: any

Defined in: packages/utils/src/mergeDeep.ts:4


modifyObjectFields#

modifyObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean, newFields: GraphQLFieldConfigMap<any, any\>): [GraphQLSchema, GraphQLFieldConfigMap<any, any\>]

Parameters#

NameType
schemaGraphQLSchema
typeNamestring
testFn(fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean
newFieldsGraphQLFieldConfigMap<any, any\>

Returns: [GraphQLSchema, GraphQLFieldConfigMap<any, any\>]

Defined in: packages/utils/src/fields.ts:107


nodeToString#

nodeToString(a: ASTNode): string

Parameters#

NameType
aASTNode

Returns: string

Defined in: packages/utils/src/helpers.ts:62


observableToAsyncIterable#

observableToAsyncIterable<T\>(observable: Observable<T\>): AsyncIterableIterator<T\>

Type parameters#

Name
T

Parameters#

NameType
observableObservable<T\>

Returns: AsyncIterableIterator<T\>

Defined in: packages/utils/src/observableToAsyncIterable.ts:17


parseGraphQLJSON#

parseGraphQLJSON(location: string, jsonContent: string, options: SchemaPrintOptions & ParseOptions & GraphQLSchemaValidationOptions): Source

Parameters#

NameType
locationstring
jsonContentstring
optionsSchemaPrintOptions & ParseOptions & GraphQLSchemaValidationOptions

Returns: Source

Defined in: packages/utils/src/parse-graphql-json.ts:24


parseGraphQLSDL#

parseGraphQLSDL(location: string, rawSDL: string, options?: GraphQLParseOptions): object

Parameters#

NameTypeDefault value
locationstring-
rawSDLstring-
optionsGraphQLParseOptions{}

Returns: object

NameType
documentDocumentNode
locationstring
rawSDLstring

Defined in: packages/utils/src/parse-graphql-sdl.ts:16


parseInputValue#

parseInputValue(type: GraphQLInputType, value: any): any

Parameters#

NameType
typeGraphQLInputType
valueany

Returns: any

Defined in: packages/utils/src/transformInputValue.ts:47


parseInputValueLiteral#

parseInputValueLiteral(type: GraphQLInputType, value: any): any

Parameters#

NameType
typeGraphQLInputType
valueany

Returns: any

Defined in: packages/utils/src/transformInputValue.ts:51


parseSelectionSet#

parseSelectionSet(selectionSet: string, options?: GraphQLParseOptions): SelectionSetNode

Parameters#

NameType
selectionSetstring
options?GraphQLParseOptions

Returns: SelectionSetNode

Defined in: packages/utils/src/selectionSets.ts:4


printSchemaWithDirectives#

printSchemaWithDirectives(schema: GraphQLSchema, options?: PrintSchemaWithDirectivesOptions): string

Parameters#

NameTypeDefault value
schemaGraphQLSchema-
optionsPrintSchemaWithDirectivesOptions{}

Returns: string

Defined in: packages/utils/src/print-schema-with-directives.ts:111


pruneSchema#

pruneSchema(schema: GraphQLSchema, options?: PruneSchemaOptions): GraphQLSchema

Prunes the provided schema, removing unused and empty types

Parameters#

NameTypeDefault valueDescription
schemaGraphQLSchema-The schema to prune
optionsPruneSchemaOptions{}Additional options for removing unused types from the schema

Returns: GraphQLSchema

Defined in: packages/utils/src/prune.ts:41


relocatedError#

relocatedError(originalError: GraphQLError, path?: ReadonlyArray<string | number\>): GraphQLError

Parameters#

NameType
originalErrorGraphQLError
path?ReadonlyArray<string | number\>

Returns: GraphQLError

Defined in: packages/utils/src/errors.ts:3


removeObjectFields#

removeObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean): [GraphQLSchema, GraphQLFieldConfigMap<any, any\>]

Parameters#

NameType
schemaGraphQLSchema
typeNamestring
testFn(fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean

Returns: [GraphQLSchema, GraphQLFieldConfigMap<any, any\>]

Defined in: packages/utils/src/fields.ts:45


renameType#

renameType(type: GraphQLObjectType, newTypeName: string): GraphQLObjectType

Parameters#

NameType
typeGraphQLObjectType
newTypeNamestring

Returns: GraphQLObjectType

Defined in: packages/utils/src/renameType.ts:17

renameType(type: GraphQLInterfaceType, newTypeName: string): GraphQLInterfaceType

Parameters#

NameType
typeGraphQLInterfaceType
newTypeNamestring

Returns: GraphQLInterfaceType

Defined in: packages/utils/src/renameType.ts:18

renameType(type: GraphQLUnionType, newTypeName: string): GraphQLUnionType

Parameters#

NameType
typeGraphQLUnionType
newTypeNamestring

Returns: GraphQLUnionType

Defined in: packages/utils/src/renameType.ts:19

renameType(type: GraphQLEnumType, newTypeName: string): GraphQLEnumType

Parameters#

NameType
typeGraphQLEnumType
newTypeNamestring

Returns: GraphQLEnumType

Defined in: packages/utils/src/renameType.ts:20

renameType(type: GraphQLScalarType, newTypeName: string): GraphQLScalarType

Parameters#

NameType
typeGraphQLScalarType
newTypeNamestring

Returns: GraphQLScalarType

Defined in: packages/utils/src/renameType.ts:21

renameType(type: GraphQLInputObjectType, newTypeName: string): GraphQLInputObjectType

Parameters#

NameType
typeGraphQLInputObjectType
newTypeNamestring

Returns: GraphQLInputObjectType

Defined in: packages/utils/src/renameType.ts:22

renameType(type: GraphQLNamedType, newTypeName: string): GraphQLNamedType

Parameters#

NameType
typeGraphQLNamedType
newTypeNamestring

Returns: GraphQLNamedType

Defined in: packages/utils/src/renameType.ts:23


rewireTypes#

rewireTypes(originalTypeMap: Record<string, GraphQLNamedType | null\>, directives: ReadonlyArray<GraphQLDirective\>): object

Parameters#

NameType
originalTypeMapRecord<string, GraphQLNamedType | null\>
directivesReadonlyArray<GraphQLDirective\>

Returns: object

NameType
directivesGraphQLDirective[]
typeMapTypeMap

Defined in: packages/utils/src/rewire.ts:32


selectObjectFields#

selectObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean): GraphQLFieldConfigMap<any, any\>

Parameters#

NameType
schemaGraphQLSchema
typeNamestring
testFn(fieldName: string, field: GraphQLFieldConfig<any, any\>) => boolean

Returns: GraphQLFieldConfigMap<any, any\>

Defined in: packages/utils/src/fields.ts:80


serializeInputValue#

serializeInputValue(type: GraphQLInputType, value: any): any

Parameters#

NameType
typeGraphQLInputType
valueany

Returns: any

Defined in: packages/utils/src/transformInputValue.ts:43


transformCommentsToDescriptions#

transformCommentsToDescriptions(sourceSdl: string, options?: GraphQLParseOptions): DocumentNode | null

Parameters#

NameTypeDefault value
sourceSdlstring-
optionsGraphQLParseOptions{}

Returns: DocumentNode | null

Defined in: packages/utils/src/parse-graphql-sdl.ts:79


transformInputValue#

transformInputValue(type: GraphQLInputType, value: any, inputLeafValueTransformer?: InputLeafValueTransformer, inputObjectValueTransformer?: InputObjectValueTransformer): any

Parameters#

NameTypeDefault value
typeGraphQLInputType-
valueany-
inputLeafValueTransformerInputLeafValueTransformernull
inputObjectValueTransformerInputObjectValueTransformernull

Returns: any

Defined in: packages/utils/src/transformInputValue.ts:5


updateArgument#

updateArgument(argName: string, argType: GraphQLInputType, argumentNodes: Record<string, ArgumentNode\>, variableDefinitionsMap: Record<string, VariableDefinitionNode\>, variableValues: Record<string, any\>, newArg: any): void

Parameters#

NameType
argNamestring
argTypeGraphQLInputType
argumentNodesRecord<string, ArgumentNode\>
variableDefinitionsMapRecord<string, VariableDefinitionNode\>
variableValuesRecord<string, any\>
newArgany

Returns: void

Defined in: packages/utils/src/updateArgument.ts:5


validateGraphQlDocuments#

validateGraphQlDocuments(schema: GraphQLSchema, documentFiles: Source[], effectiveRules?: ValidationRule[]): Promise<ReadonlyArray<LoadDocumentError\>\>

Parameters#

NameType
schemaGraphQLSchema
documentFilesSource[]
effectiveRules?ValidationRule[]

Returns: Promise<ReadonlyArray<LoadDocumentError\>\>

Defined in: packages/utils/src/validate-documents.ts:21


valueMatchesCriteria#

valueMatchesCriteria(value: any, criteria: any): boolean

Parameters#

NameType
valueany
criteriaany

Returns: boolean

Defined in: packages/utils/src/valueMatchesCriteria.ts:1


visitData#

visitData(data: any, enter?: ValueVisitor, leave?: ValueVisitor): any

Parameters#

NameType
dataany
enter?ValueVisitor
leave?ValueVisitor

Returns: any

Defined in: packages/utils/src/visitResult.ts:52


visitErrors#

visitErrors(errors: ReadonlyArray<GraphQLError\>, visitor: (error: GraphQLError) => GraphQLError): GraphQLError[]

Parameters#

NameType
errorsReadonlyArray<GraphQLError\>
visitor(error: GraphQLError) => GraphQLError

Returns: GraphQLError[]

Defined in: packages/utils/src/visitResult.ts:71


visitResult#

visitResult(result: ExecutionResult, request: Request, schema: GraphQLSchema, resultVisitorMap?: ResultVisitorMap, errorVisitorMap?: ErrorVisitorMap): any

Parameters#

NameType
resultExecutionResult
requestRequest
schemaGraphQLSchema
resultVisitorMap?ResultVisitorMap
errorVisitorMap?ErrorVisitorMap

Returns: any

Defined in: packages/utils/src/visitResult.ts:77


visitSchema#

visitSchema(schema: GraphQLSchema, visitorOrVisitorSelector: VisitorSelector | (SchemaVisitor | SchemaVisitorMap)[] | SchemaVisitor | SchemaVisitorMap): GraphQLSchema

Parameters#

NameType
schemaGraphQLSchema
visitorOrVisitorSelectorVisitorSelector | (SchemaVisitor | SchemaVisitorMap)[] | SchemaVisitor | SchemaVisitorMap

Returns: GraphQLSchema

Defined in: packages/utils/src/visitSchema.ts:42


withCancel#

withCancel<T\>(asyncIteratorLike: { [Symbol.asyncIterator]: () => AsyncIterator<T, any, undefined\> }, onCancel: () => void): AsyncIterator<T | undefined\>

Type parameters#

Name
T

Parameters#

NameType
asyncIteratorLikeobject
asyncIteratorLike.[Symbol.asyncIterator]-
onCancel() => void

Returns: AsyncIterator<T | undefined\>

Defined in: packages/utils/src/withCancel.ts:1