graphql-compose
- Version 9.0.11
- Published
- 909 kB
- 1 dependency
- MIT license
Install
npm i graphql-compose
yarn add graphql-compose
pnpm add graphql-compose
Overview
GraphQL schema builder from different data sources with middleware extensions.
Index
Variables
Functions
- camelCase()
- changeUnwrappedTC()
- clearName()
- cloneTypeTo()
- convertInputObjectField()
- createThunkedObjectProxy()
- dedent()
- deepmerge()
- filterByDotPaths()
- forEachKey()
- getComposeTypeName()
- getFlatProjectionFromAST()
- getGraphQLType()
- getGraphqlVersion()
- getPluralName()
- getProjectionFromAST()
- inspect()
- invariant()
- isComposeInputType()
- isComposeNamedType()
- isComposeOutputType()
- isComposeType()
- isDefinedType()
- isEnumTypeDefinitionString()
- isFunction()
- isInputTypeDefinitionString()
- isInterfaceTypeDefinitionString()
- isNamedTypeComposer()
- isObject()
- isOutputTypeDefinitionString()
- isScalarTypeDefinitionString()
- isSchemaOfCommonNames()
- isSomeInputTypeComposer()
- isSomeInputTypeDefinitionString()
- isSomeOutputTypeComposer()
- isSomeOutputTypeDefinitionString()
- isString()
- isTypeComposer()
- isTypeDefinitionString()
- isTypeNameString()
- isUnionTypeDefinitionString()
- isWrappedTypeNameString()
- keyMap()
- keyValMap()
- mapEachKey()
- omit()
- only()
- pluralize()
- printArgs()
- printBlock()
- printDescription()
- printDescriptionWithComments()
- printDirective()
- printEnum()
- printFields()
- printFilteredSchema()
- printImplementedInterfaces()
- printInputObject()
- printInputValue()
- printInterface()
- printIntrospectionSchema()
- printNodeDirectives()
- printObject()
- printScalar()
- printSchema()
- printSchemaComposer()
- printSchemaDefinition()
- printType()
- printUnion()
- replaceTC()
- resolveMaybeThunk()
- toDottedObject()
- toInputObjectType()
- toInputType()
- unwrapInputTC()
- unwrapOutputTC()
- unwrapTC()
- unwrapTypeNameString()
- upperFirst()
Classes
EnumTypeComposer
- addFields()
- clearExtensions()
- clearFieldExtensions()
- clone()
- cloneTo()
- create()
- createTemp()
- deprecateFields()
- extendExtensions()
- extendField()
- extendFieldExtensions()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getField()
- getFieldDirectiveById()
- getFieldDirectiveByName()
- getFieldDirectiveNames()
- getFieldDirectives()
- getFieldExtension()
- getFieldExtensions()
- getFieldNames()
- getFields()
- getType()
- getTypeName()
- getTypeNonNull()
- getTypePlural()
- hasExtension()
- hasField()
- hasFieldExtension()
- List
- merge()
- NonNull
- removeExtension()
- removeField()
- removeFieldExtension()
- removeOtherFields()
- reorderFields()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setField()
- setFieldDirectiveByName()
- setFieldDirectives()
- setFieldExtension()
- setFieldExtensions()
- setFields()
- setTypeName()
- toSDL()
InputTypeComposer
- addFields()
- addNestedFields()
- clearExtensions()
- clearFieldExtensions()
- clone()
- cloneTo()
- create()
- createTemp()
- extendExtensions()
- extendField()
- extendFieldExtensions()
- get()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getField()
- getFieldConfig()
- getFieldDirectiveById()
- getFieldDirectiveByName()
- getFieldDirectiveNames()
- getFieldDirectives()
- getFieldExtension()
- getFieldExtensions()
- getFieldITC()
- getFieldNames()
- getFields()
- getFieldTC()
- getFieldType()
- getFieldTypeName()
- getNestedTCs()
- getType()
- getTypeName()
- getTypeNonNull()
- getTypePlural()
- hasExtension()
- hasField()
- hasFieldExtension()
- isFieldNonNull()
- isFieldPlural()
- isRequired()
- List
- makeFieldNonNull()
- makeFieldNonPlural()
- makeFieldNullable()
- makeFieldPlural()
- makeOptional()
- makeRequired()
- merge()
- NonNull
- removeExtension()
- removeField()
- removeFieldExtension()
- removeOtherFields()
- reorderFields()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setField()
- setFieldDirectiveByName()
- setFieldDirectives()
- setFieldExtension()
- setFieldExtensions()
- setFields()
- setTypeName()
- toSDL()
InterfaceTypeComposer
- addFieldArgs()
- addFields()
- addInterface()
- addInterfaces()
- addTypeResolver()
- clearExtensions()
- clearFieldArgExtensions()
- clearFieldExtensions()
- clone()
- cloneTo()
- create()
- createTemp()
- deprecateFields()
- extendExtensions()
- extendField()
- extendFieldArgExtensions()
- extendFieldExtensions()
- get()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getField()
- getFieldArg()
- getFieldArgDirectiveById()
- getFieldArgDirectiveByName()
- getFieldArgDirectiveNames()
- getFieldArgDirectives()
- getFieldArgExtension()
- getFieldArgExtensions()
- getFieldArgITC()
- getFieldArgNames()
- getFieldArgs()
- getFieldArgTC()
- getFieldArgType()
- getFieldArgTypeName()
- getFieldConfig()
- getFieldDirectiveById()
- getFieldDirectiveByName()
- getFieldDirectiveNames()
- getFieldDirectives()
- getFieldExtension()
- getFieldExtensions()
- getFieldNames()
- getFieldOTC()
- getFields()
- getFieldTC()
- getFieldType()
- getFieldTypeName()
- getInputType()
- getInputTypeComposer()
- getInterfaces()
- getInterfacesTypes()
- getITC()
- getNestedTCs()
- getResolveType()
- getType()
- getTypeName()
- getTypeNonNull()
- getTypePlural()
- getTypeResolverCheckFn()
- getTypeResolverNames()
- getTypeResolvers()
- getTypeResolverTypes()
- hasExtension()
- hasField()
- hasFieldArg()
- hasFieldArgExtension()
- hasFieldExtension()
- hasInputTypeComposer()
- hasInterface()
- hasTypeResolver()
- isFieldArgNonNull()
- isFieldArgPlural()
- isFieldNonNull()
- isFieldPlural()
- List
- makeFieldArgNonNull()
- makeFieldArgNonPlural()
- makeFieldArgNullable()
- makeFieldArgPlural()
- makeFieldNonNull()
- makeFieldNonPlural()
- makeFieldNullable()
- makeFieldPlural()
- merge()
- NonNull
- removeExtension()
- removeField()
- removeFieldArgExtension()
- removeFieldExtension()
- removeInputTypeComposer()
- removeInterface()
- removeOtherFields()
- removeTypeResolver()
- reorderFields()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setField()
- setFieldArg()
- setFieldArgDirectiveByName()
- setFieldArgDirectives()
- setFieldArgExtension()
- setFieldArgExtensions()
- setFieldArgs()
- setFieldDirectiveByName()
- setFieldDirectives()
- setFieldExtension()
- setFieldExtensions()
- setFields()
- setInputTypeComposer()
- setInterfaces()
- setResolveType()
- setTypeName()
- setTypeResolverFallback()
- setTypeResolvers()
- toSDL()
ObjectTypeComposer
- addFieldArgs()
- addFields()
- addInterface()
- addInterfaces()
- addNestedFields()
- addRelation()
- addResolver()
- clearExtensions()
- clearFieldArgExtensions()
- clearFieldExtensions()
- clone()
- cloneTo()
- create()
- createTemp()
- deprecateFields()
- extendExtensions()
- extendField()
- extendFieldArgExtensions()
- extendFieldExtensions()
- get()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getField()
- getFieldArg()
- getFieldArgDirectiveById()
- getFieldArgDirectiveByName()
- getFieldArgDirectiveNames()
- getFieldArgDirectives()
- getFieldArgExtension()
- getFieldArgExtensions()
- getFieldArgITC()
- getFieldArgNames()
- getFieldArgs()
- getFieldArgTC()
- getFieldArgType()
- getFieldArgTypeName()
- getFieldConfig()
- getFieldDirectiveById()
- getFieldDirectiveByName()
- getFieldDirectiveNames()
- getFieldDirectives()
- getFieldExtension()
- getFieldExtensions()
- getFieldNames()
- getFieldOTC()
- getFields()
- getFieldTC()
- getFieldType()
- getFieldTypeName()
- getInputType()
- getInputTypeComposer()
- getInterfaces()
- getInterfacesTypes()
- getIsTypeOf()
- getITC()
- getNestedTCs()
- getRecordId()
- getRecordIdFn()
- getRelations()
- getResolver()
- getResolvers()
- getType()
- getTypeName()
- getTypeNonNull()
- getTypePlural()
- hasExtension()
- hasField()
- hasFieldArg()
- hasFieldArgExtension()
- hasFieldExtension()
- hasInputTypeComposer()
- hasInterface()
- hasRecordIdFn()
- hasResolver()
- isFieldArgNonNull()
- isFieldArgPlural()
- isFieldNonNull()
- isFieldPlural()
- List
- makeFieldArgNonNull()
- makeFieldArgNonPlural()
- makeFieldArgNullable()
- makeFieldArgPlural()
- makeFieldNonNull()
- makeFieldNonPlural()
- makeFieldNullable()
- makeFieldPlural()
- merge()
- NonNull
- removeExtension()
- removeField()
- removeFieldArg()
- removeFieldArgExtension()
- removeFieldExtension()
- removeFieldOtherArgs()
- removeInputTypeComposer()
- removeInterface()
- removeOtherFields()
- removeResolver()
- reorderFields()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setField()
- setFieldArg()
- setFieldArgDirectiveByName()
- setFieldArgDirectives()
- setFieldArgExtension()
- setFieldArgExtensions()
- setFieldArgs()
- setFieldDirectiveByName()
- setFieldDirectives()
- setFieldExtension()
- setFieldExtensions()
- setFields()
- setInputTypeComposer()
- setInterfaces()
- setIsTypeOf()
- setRecordIdFn()
- setResolver()
- setTypeName()
- toSDL()
- wrapResolver()
- wrapResolverAs()
- wrapResolverResolve()
Resolver
- addArgs()
- addFilterArg()
- addSortArg()
- args
- clearExtensions()
- clone()
- cloneArg()
- cloneTo()
- debug()
- debugExecTime()
- debugParams()
- debugPayload()
- deprecationReason
- description
- directives
- displayName
- extendArg()
- extendExtensions()
- extensions
- get()
- getArg()
- getArgConfig()
- getArgITC()
- getArgNames()
- getArgs()
- getArgTC()
- getArgType()
- getArgTypeName()
- getDeprecationReason()
- getDescription()
- getExtension()
- getExtensions()
- getFieldConfig()
- getFieldResolver()
- getKind()
- getNestedName()
- getOTC()
- getResolve()
- getType()
- getTypeComposer()
- getTypeName()
- hasArg()
- hasExtension()
- isArgNonNull()
- isArgPlural()
- kind
- makeArgNonNull()
- makeArgNonPlural()
- makeArgNullable()
- makeArgPlural()
- makeOptional()
- makeRequired()
- name
- parent
- projection
- removeArg()
- removeExtension()
- removeOtherArgs()
- reorderArgs()
- resolve
- schemaComposer
- setArg()
- setArgs()
- setArgType()
- setDeprecationReason()
- setDescription()
- setDisplayName()
- setExtension()
- setExtensions()
- setKind()
- setResolve()
- setType()
- toDebugStructure()
- toString()
- type
- withMiddlewares()
- wrap()
- wrapArgs()
- wrapCloneArg()
- wrapResolve()
- wrapType()
ScalarTypeComposer
- clearExtensions()
- clone()
- cloneTo()
- create()
- createTemp()
- extendExtensions()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getParseLiteral()
- getParseValue()
- getSerialize()
- getSpecifiedByUrl()
- getType()
- getTypeName()
- getTypeNonNull()
- getTypePlural()
- hasExtension()
- List
- merge()
- NonNull
- removeExtension()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setParseLiteral()
- setParseValue()
- setSerialize()
- setSpecifiedByUrl()
- setTypeName()
- toSDL()
SchemaComposer
- add()
- addAsComposer()
- addDirective()
- addResolveMethods()
- addSchemaMustHaveType()
- addTypeDefs()
- buildSchema()
- clear()
- clone()
- createEnumTC()
- createInputTC()
- createInterfaceTC()
- createObjectTC()
- createResolver()
- createScalarTC()
- createTC()
- createTempTC()
- createUnionTC()
- getAnyTC()
- getDescription()
- getDirective()
- getDirectives()
- getETC()
- getIFTC()
- getITC()
- getOrCreateETC()
- getOrCreateIFTC()
- getOrCreateITC()
- getOrCreateOTC()
- getOrCreateSTC()
- getOrCreateTC()
- getOrCreateUTC()
- getOTC()
- getResolveMethods()
- getSTC()
- getTypeSDL()
- getUTC()
- hasDirective()
- inspect()
- isEnumType()
- isInputObjectType()
- isInterfaceType()
- isObjectType()
- isScalarType()
- isUnionType()
- merge()
- Mutation
- Query
- removeDirective()
- removeEmptyTypes()
- set()
- setDescription()
- Subscription
- toJSON()
- toSDL()
- toString()
- typeMapper
TypeMapper
- buildWrappedTypeDef()
- checkSchemaDef()
- convertArgConfig()
- convertArgConfigMap()
- convertGraphQLTypeToComposer()
- convertInputFieldConfig()
- convertInputFieldConfigMap()
- convertInputTypeDefinition()
- convertInterfaceTypeDefinition()
- convertOutputFieldConfig()
- convertOutputFieldConfigMap()
- convertOutputTypeDefinition()
- convertSDLTypeDefinition()
- convertSDLWrappedTypeName()
- getBuiltInType()
- getDeprecationReason()
- getNamedTypeAST()
- isEnumTypeDefinitionString()
- isInputType()
- isInputTypeDefinitionString()
- isInterfaceTypeDefinitionString()
- isOutputType()
- isOutputTypeDefinitionString()
- isScalarTypeDefinitionString()
- isTypeDefinitionString()
- isTypeNameString()
- isUnionTypeDefinitionString()
- makeArguments()
- makeDirectiveDef()
- makeEnumDef()
- makeEnumValuesDef()
- makeExtendEnumDef()
- makeExtendInputObjectDef()
- makeExtendInterfaceDef()
- makeExtendScalarDef()
- makeExtendTypeDef()
- makeExtendUnionDef()
- makeFieldDefMap()
- makeImplementedInterfaces()
- makeInputFieldDef()
- makeInputObjectDef()
- makeInterfaceDef()
- makeScalarDef()
- makeSchemaDef()
- makeTypeDef()
- makeUnionDef()
- parseDirectives()
- parseTypes()
- parseTypesFromString()
- schemaComposer
- typeFromAST()
- typeFromASTInput()
- typeFromASTOutput()
UnionTypeComposer
- addType()
- addTypeResolver()
- addTypes()
- clearExtensions()
- clearTypes()
- clone()
- cloneTo()
- create()
- createTemp()
- extendExtensions()
- getDescription()
- getDirectiveById()
- getDirectiveByName()
- getDirectiveNames()
- getDirectives()
- getExtension()
- getExtensions()
- getNestedTCs()
- getResolveType()
- getType()
- getTypeComposers()
- getTypeName()
- getTypeNames()
- getTypeNonNull()
- getTypePlural()
- getTypeResolverCheckFn()
- getTypeResolverNames()
- getTypeResolvers()
- getTypeResolverTypes()
- getTypes()
- hasExtension()
- hasType()
- hasTypeResolver()
- List
- merge()
- NonNull
- removeExtension()
- removeOtherTypes()
- removeType()
- removeTypeResolver()
- schemaComposer
- setDescription()
- setDirectiveByName()
- setDirectives()
- setExtension()
- setExtensions()
- setResolveType()
- setTypeName()
- setTypeResolverFallback()
- setTypeResolvers()
- setTypes()
- toSDL()
Type Aliases
- AnyType
- AnyTypeComposer
- ComposeInputType
- ComposeInputTypeDefinition
- ComposeNamedInputType
- ComposeNamedOutputType
- ComposeOutputType
- ComposeOutputTypeDefinition
- Directive
- DirectiveArgs
- EnumTypeComposerAsObjectDefinition
- EnumTypeComposerDefinition
- EnumTypeComposerValueConfig
- EnumTypeComposerValueConfigDefinition
- EnumTypeComposerValueConfigMap
- EnumTypeComposerValueConfigMapDefinition
- Extensions
- InputTypeComposerAsObjectDefinition
- InputTypeComposerDefinition
- InputTypeComposerFieldConfig
- InputTypeComposerFieldConfigAsObjectDefinition
- InputTypeComposerFieldConfigDefinition
- InputTypeComposerFieldConfigMap
- InputTypeComposerFieldConfigMapDefinition
- InputTypeComposerThunked
- InterfaceTypeComposerAsObjectDefinition
- InterfaceTypeComposerDefinition
- InterfaceTypeComposerResolverCheckFn
- InterfaceTypeComposerResolversMap
- InterfaceTypeComposerThunked
- MaybePromise
- NamedTypeComposer
- ObjectTypeComposerArgumentConfig
- ObjectTypeComposerArgumentConfigAsObjectDefinition
- ObjectTypeComposerArgumentConfigDefinition
- ObjectTypeComposerArgumentConfigMap
- ObjectTypeComposerArgumentConfigMapDefinition
- ObjectTypeComposerAsObjectDefinition
- ObjectTypeComposerDefinition
- ObjectTypeComposerFieldConfig
- ObjectTypeComposerFieldConfigAsObjectDefinition
- ObjectTypeComposerFieldConfigDefinition
- ObjectTypeComposerFieldConfigMap
- ObjectTypeComposerFieldConfigMapDefinition
- ObjectTypeComposerGetRecordIdFn
- ObjectTypeComposerRelationArgsMapper
- ObjectTypeComposerRelationArgsMapperFn
- ObjectTypeComposerRelationMap
- ObjectTypeComposerRelationOpts
- ObjectTypeComposerRelationOptsWithResolver
- ObjectTypeComposerThunked
- ObjMap
- ObjMapReadOnly
- ProjectionNode
- ProjectionType
- ResolverDebugOpts
- ResolverDefinition
- ResolverFilterArgConfigDefinition
- ResolverFilterArgFn
- ResolverKinds
- ResolverMiddleware
- ResolverNextRpCb
- ResolverResolveParams
- ResolverRpCb
- ResolverSortArgConfig
- ResolverSortArgFn
- ResolverWrapCb
- ScalarTypeComposerAsObjectDefinition
- ScalarTypeComposerDefinition
- SchemaComposerPrinterOptions
- SchemaPrinterOptions
- Thunk
- ThunkWithSchemaComposer
- TypeDefinitionString
- TypeNameString
- TypeWrappedString
- UnionTypeComposerAsObjectDefinition
- UnionTypeComposerDefinition
- UnionTypeComposerResolverCheckFn
- UnionTypeComposerResolversMap
- UnionTypeComposerResolversMapDefinition
- UnionTypeComposerThunked
Namespaces
Variables
variable GraphQLBuffer
const GraphQLBuffer: GraphQLScalarType<Buffer, string>;
variable GraphQLDate
const GraphQLDate: GraphQLScalarType<Date, string>;
variable GraphQLJSON
const GraphQLJSON: GraphQLScalarType;
variable GraphQLJSONObject
const GraphQLJSONObject: GraphQLScalarType;
variable graphqlVersion
const graphqlVersion: number;
variable sc
const sc: SchemaComposer<any>;
variable schemaComposer
const schemaComposer: SchemaComposer<any>;
Functions
function camelCase
camelCase: (str: string) => string;
function changeUnwrappedTC
changeUnwrappedTC: <TContext, T>( anyTC: T, cb: (tc: NamedTypeComposer<TContext>) => NamedTypeComposer<TContext>) => T;
function clearName
clearName: (str: string) => string;
function cloneTypeTo
cloneTypeTo: ( type: AnyTypeComposer<any> | TypeAsString | GraphQLType, anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => AnyTypeComposer<any> | TypeAsString;
function convertInputObjectField
convertInputObjectField: ( field: ComposeOutputType<any>, opts: ToInputTypeOpts) => ComposeInputType;
function createThunkedObjectProxy
createThunkedObjectProxy: <T extends Record<string, any>>(thunk: () => T) => T;
function dedent
dedent: ( strings: string | string[] | TemplateStringsArray, ...values: string[]) => string;
function deepmerge
deepmerge: <T = any>(target: any, src: T) => T;
function filterByDotPaths
filterByDotPaths: ( obj: Record<any, any>, pathsFilter?: PathsFilter | null, opts?: FilterOpts) => Record<any, any>;
function forEachKey
forEachKey: <V>( obj: { [key: string]: V } | ObjMap<V>, callback: (value: V, key: string) => void) => void;
function getComposeTypeName
getComposeTypeName: (type: any, sc: SchemaComposer<any>) => string;
function getFlatProjectionFromAST
getFlatProjectionFromAST: ( info: GraphQLResolveInfo, fieldNodes?: FieldNode | InlineFragmentNode | FragmentDefinitionNode) => Record<any, any>;
function getGraphQLType
getGraphQLType: (anyType: any) => GraphQLType;
function getGraphqlVersion
getGraphqlVersion: () => number;
function getPluralName
getPluralName: (name: string) => string;
function getProjectionFromAST
getProjectionFromAST: ( info: GraphQLResolveInfo, fieldNode?: FieldNode | InlineFragmentNode | FragmentDefinitionNode) => ProjectionType;
function inspect
inspect: (value: unknown) => string;
function invariant
invariant: (condition: unknown, message?: string) => asserts condition;
function isComposeInputType
isComposeInputType: (type: any) => type is any;
function isComposeNamedType
isComposeNamedType: (type: any) => type is any;
function isComposeOutputType
isComposeOutputType: (type: any) => type is any;
function isComposeType
isComposeType: (type: any) => type is AnyTypeComposer<any>;
function isDefinedType
isDefinedType: (type: GraphQLNamedType) => boolean;
function isEnumTypeDefinitionString
isEnumTypeDefinitionString: (str: string) => boolean;
function isFunction
isFunction: (value: unknown) => value is (...args: any) => any;
function isInputTypeDefinitionString
isInputTypeDefinitionString: (str: string) => boolean;
function isInterfaceTypeDefinitionString
isInterfaceTypeDefinitionString: (str: string) => boolean;
function isNamedTypeComposer
isNamedTypeComposer: (type: any) => type is NamedTypeComposer<any>;
function isObject
isObject: (value: unknown) => value is Record<any, any>;
function isOutputTypeDefinitionString
isOutputTypeDefinitionString: (str: string) => boolean;
function isScalarTypeDefinitionString
isScalarTypeDefinitionString: (str: string) => boolean;
function isSchemaOfCommonNames
isSchemaOfCommonNames: (schema: GraphQLSchema) => boolean;
function isSomeInputTypeComposer
isSomeInputTypeComposer: (type: any) => type is ComposeInputType;
function isSomeInputTypeDefinitionString
isSomeInputTypeDefinitionString: (str: string) => boolean;
function isSomeOutputTypeComposer
isSomeOutputTypeComposer: (type: any) => type is ComposeOutputType<any>;
function isSomeOutputTypeDefinitionString
isSomeOutputTypeDefinitionString: (str: string) => boolean;
function isString
isString: (value: unknown) => value is string;
function isTypeComposer
isTypeComposer: (type: any) => type is AnyTypeComposer<any>;
function isTypeDefinitionString
isTypeDefinitionString: (str: string) => boolean;
function isTypeNameString
isTypeNameString: (str: string) => boolean;
function isUnionTypeDefinitionString
isUnionTypeDefinitionString: (str: string) => boolean;
function isWrappedTypeNameString
isWrappedTypeNameString: (str: string) => boolean;
function keyMap
keyMap: <T>(list: ReadonlyArray<T>, keyFn: (item: T) => string) => ObjMap<T>;
function keyValMap
keyValMap: <T, V>( list: ReadonlyArray<T>, keyFn: (item: T) => string, valFn: (item: T) => V) => ObjMap<V>;
function mapEachKey
mapEachKey: <NewV = any, T extends Object = {}>( obj: T, callback: ( value: NonNullable<T>[keyof NonNullable<T>], key: keyof NonNullable<T> ) => NewV) => T extends undefined ? undefined : ObjMap<NewV>;
function omit
omit: (obj: Record<any, any>, keys: string | string[]) => Record<any, any>;
function only
only: (obj: Record<any, any>, keys: string | string[]) => Record<any, any>;
function pluralize
pluralize: (str: string) => string;
function printArgs
printArgs: ( _args: ReadonlyArray<GraphQLArgument>, options?: Options, indentation?: string) => string;
function printBlock
printBlock: (items: Array<string>) => string;
function printDescription
printDescription: ( def: any, options?: Options, indentation?: string, firstInBlock?: boolean) => string;
function printDescriptionWithComments
printDescriptionWithComments: ( description: string, indentation: string, firstInBlock: boolean) => string;
function printDirective
printDirective: (directive: GraphQLDirective, options?: Options) => string;
function printEnum
printEnum: (type: GraphQLEnumType, options?: Options) => string;
function printFields
printFields: ( type: GraphQLObjectType | GraphQLInterfaceType, options?: Options) => string;
function printFilteredSchema
printFilteredSchema: ( schema: GraphQLSchema, directiveFilter: (type: GraphQLDirective) => boolean, typeFilter: (type: GraphQLNamedType) => boolean, options?: Options) => string;
function printImplementedInterfaces
printImplementedInterfaces: ( type: GraphQLObjectType | GraphQLInterfaceType, options?: Options) => string;
function printInputObject
printInputObject: (type: GraphQLInputObjectType, options?: Options) => string;
function printInputValue
printInputValue: (arg: GraphQLArgument | GraphQLInputField) => string;
function printInterface
printInterface: (type: GraphQLInterfaceType, options?: Options) => string;
function printIntrospectionSchema
printIntrospectionSchema: (schema: GraphQLSchema, options?: Options) => string;
function printNodeDirectives
printNodeDirectives: ( node: { directives?: ReadonlyArray<DirectiveNode> } | undefined | null) => string;
function printObject
printObject: (type: GraphQLObjectType, options?: Options) => string;
function printScalar
printScalar: (type: GraphQLScalarType, options?: Options) => string;
function printSchema
printSchema: (schema: GraphQLSchema, options?: Options) => string;
function printSchemaComposer
printSchemaComposer: ( sc: SchemaComposer<any>, options?: SchemaComposerPrinterOptions) => string;
function printSchemaDefinition
printSchemaDefinition: (schema: GraphQLSchema) => string;
function printType
printType: (type: GraphQLNamedType, options?: Options) => string;
function printUnion
printUnion: (type: GraphQLUnionType, options?: Options) => string;
function replaceTC
replaceTC: <T>( anyTC: T, replaceByTC: | Readonly<NamedTypeComposer<any>> | ((unwrappedTC: NamedTypeComposer<any>) => NamedTypeComposer<any>)) => T;
function resolveMaybeThunk
resolveMaybeThunk: <T>(thingOrThunk: Thunk<T>) => T;
function toDottedObject
toDottedObject: ( obj: Record<any, any>, target?: Record<any, any>, path?: string[]) => Record<string, any>;
function toInputObjectType
toInputObjectType: <TContext>( tc: ObjectTypeComposer<any, TContext> | InterfaceTypeComposer<any, TContext>, opts?: ToInputTypeOpts) => InputTypeComposer<TContext>;
function toInputType
toInputType: ( anyTC: AnyTypeComposer<any>, opts?: ToInputTypeOpts) => ComposeInputType;
function unwrapInputTC
unwrapInputTC: (inputTC: ComposeInputType) => ComposeNamedInputType<any>;
function unwrapOutputTC
unwrapOutputTC: <TContext>( outputTC: ComposeOutputType<TContext>) => ComposeNamedOutputType<TContext>;
function unwrapTC
unwrapTC: <TContext>( anyTC: AnyTypeComposer<TContext>) => NamedTypeComposer<TContext>;
function unwrapTypeNameString
unwrapTypeNameString: (str: string) => string;
function upperFirst
upperFirst: (str: string) => string;
Classes
class EnumTypeComposer
class EnumTypeComposer<TContext = any> {}
constructor
constructor( graphqlType: GraphQLEnumType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<EnumTypeComposer<TContext>>;
property NonNull
readonly NonNull: NonNullComposer<EnumTypeComposer<TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method addFields
addFields: (newValues: EnumTypeComposerValueConfigMapDefinition) => this;
method clearExtensions
clearExtensions: () => this;
method clearFieldExtensions
clearFieldExtensions: (fieldName: string) => this;
method clone
clone: ( newTypeNameOrTC: string | EnumTypeComposer<any>) => EnumTypeComposer<any>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => EnumTypeComposer<any>;
method create
static create: <TCtx = any>( typeDef: EnumTypeComposerDefinition, schemaComposer: SchemaComposer<TCtx>) => EnumTypeComposer<TCtx>;
method createTemp
static createTemp: <TCtx = any>( typeDef: EnumTypeComposerDefinition, schemaComposer?: SchemaComposer<TCtx>) => EnumTypeComposer<TCtx>;
method deprecateFields
deprecateFields: ( fields: string | string[] | { [fieldName: string]: string }) => this;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method extendField
extendField: ( name: string, partialValueConfig: Partial<EnumTypeComposerValueConfigDefinition>) => this;
method extendFieldExtensions
extendFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getField
getField: (name: string) => EnumTypeComposerValueConfig;
method getFieldDirectiveById
getFieldDirectiveById: ( fieldName: string, idx: number) => DirectiveArgs | undefined;
method getFieldDirectiveByName
getFieldDirectiveByName: ( fieldName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldDirectiveNames
getFieldDirectiveNames: (fieldName: string) => string[];
method getFieldDirectives
getFieldDirectives: (fieldName: string) => Array<Directive>;
method getFieldExtension
getFieldExtension: (fieldName: string, extensionName: string) => unknown;
method getFieldExtensions
getFieldExtensions: (fieldName: string) => Extensions;
method getFieldNames
getFieldNames: () => string[];
method getFields
getFields: () => EnumTypeComposerValueConfigMap;
method getType
getType: () => GraphQLEnumType;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<EnumTypeComposer<TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<EnumTypeComposer<TContext>>;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method hasField
hasField: (name: string) => boolean;
method hasFieldExtension
hasFieldExtension: (fieldName: string, extensionName: string) => boolean;
method merge
merge: (type: GraphQLEnumType | EnumTypeComposer<any>) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeField
removeField: (nameOrArray: string | string[]) => this;
method removeFieldExtension
removeFieldExtension: (fieldName: string, extensionName: string) => this;
method removeOtherFields
removeOtherFields: (fieldNameOrArray: string | string[]) => this;
method reorderFields
reorderFields: (names: string[]) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined) => this;
method setField
setField: ( name: string, valueConfig: EnumTypeComposerValueConfigDefinition) => this;
method setFieldDirectiveByName
setFieldDirectiveByName: ( fieldName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldDirectives
setFieldDirectives: ( fieldName: string, directives: Array<Directive> | undefined) => this;
method setFieldExtension
setFieldExtension: ( fieldName: string, extensionName: string, value: unknown) => this;
method setFieldExtensions
setFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method setFields
setFields: (values: EnumTypeComposerValueConfigMapDefinition) => this;
method setTypeName
setTypeName: (name: string) => this;
method toSDL
toSDL: (opts?: SchemaPrinterOptions) => string;
class InputTypeComposer
class InputTypeComposer<TContext = any> {}
constructor
constructor( graphqlType: GraphQLInputObjectType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<InputTypeComposer<TContext>>;
property NonNull
readonly NonNull: NonNullComposer<InputTypeComposer<TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method addFields
addFields: (newFields: InputTypeComposerFieldConfigMapDefinition) => this;
method addNestedFields
addNestedFields: (newFields: InputTypeComposerFieldConfigMapDefinition) => this;
method clearExtensions
clearExtensions: () => this;
method clearFieldExtensions
clearFieldExtensions: (fieldName: string) => this;
method clone
clone: ( newTypeNameOrTC: string | InputTypeComposer<any>) => InputTypeComposer<TContext>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => InputTypeComposer<any>;
method create
static create: <TCtx = any>( typeDef: InputTypeComposerDefinition, schemaComposer: SchemaComposer<TCtx>) => InputTypeComposer<TCtx>;
method createTemp
static createTemp: <TCtx = any>( typeDef: InputTypeComposerDefinition, schemaComposer?: SchemaComposer<TCtx>) => InputTypeComposer<TCtx>;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method extendField
extendField: ( fieldName: string, partialFieldConfig: Partial<InputTypeComposerFieldConfigAsObjectDefinition>) => this;
method extendFieldExtensions
extendFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method get
get: (path: string | string[]) => TypeInPath<TContext> | void;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getField
getField: (fieldName: string) => InputTypeComposerFieldConfig;
method getFieldConfig
getFieldConfig: (fieldName: string) => GraphQLInputFieldConfig;
method getFieldDirectiveById
getFieldDirectiveById: ( fieldName: string, idx: number) => DirectiveArgs | undefined;
method getFieldDirectiveByName
getFieldDirectiveByName: ( fieldName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldDirectiveNames
getFieldDirectiveNames: (fieldName: string) => string[];
method getFieldDirectives
getFieldDirectives: (fieldName: string) => Array<Directive>;
method getFieldExtension
getFieldExtension: (fieldName: string, extensionName: string) => unknown;
method getFieldExtensions
getFieldExtensions: (fieldName: string) => Extensions;
method getFieldITC
getFieldITC: (fieldName: string) => InputTypeComposer<TContext>;
method getFieldNames
getFieldNames: () => string[];
method getFields
getFields: () => InputTypeComposerFieldConfigMap;
method getFieldTC
getFieldTC: (fieldName: string) => ComposeNamedInputType<TContext>;
method getFieldType
getFieldType: (fieldName: string) => GraphQLInputType;
method getFieldTypeName
getFieldTypeName: (fieldName: string) => string;
method getNestedTCs
getNestedTCs: ( opts?: { exclude?: string[] | null }, passedTypes?: Set<NamedTypeComposer<any>>) => Set<NamedTypeComposer<any>>;
method getType
getType: () => GraphQLInputObjectType;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<InputTypeComposer<TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<InputTypeComposer<TContext>>;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method hasField
hasField: (fieldName: string) => boolean;
method hasFieldExtension
hasFieldExtension: (fieldName: string, extensionName: string) => boolean;
method isFieldNonNull
isFieldNonNull: (fieldName: string) => boolean;
method isFieldPlural
isFieldPlural: (fieldName: string) => boolean;
method isRequired
isRequired: (fieldName: string) => boolean;
method makeFieldNonNull
makeFieldNonNull: (fieldNameOrArray: string | string[]) => this;
method makeFieldNonPlural
makeFieldNonPlural: (fieldNameOrArray: string | string[]) => this;
method makeFieldNullable
makeFieldNullable: (fieldNameOrArray: string | string[]) => this;
method makeFieldPlural
makeFieldPlural: (fieldNameOrArray: string | string[]) => this;
method makeOptional
makeOptional: (fieldNameOrArray: string | string[]) => this;
method makeRequired
makeRequired: (fieldNameOrArray: string | string[]) => this;
method merge
merge: (type: GraphQLInputObjectType | InputTypeComposer<any>) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeField
removeField: (fieldNameOrArray: string | string[]) => this;
method removeFieldExtension
removeFieldExtension: (fieldName: string, extensionName: string) => this;
method removeOtherFields
removeOtherFields: (fieldNameOrArray: string | string[]) => this;
method reorderFields
reorderFields: (names: string[]) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined) => this;
method setField
setField: ( fieldName: string, fieldConfig: InputTypeComposerFieldConfigDefinition) => this;
method setFieldDirectiveByName
setFieldDirectiveByName: ( fieldName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldDirectives
setFieldDirectives: ( fieldName: string, directives: Array<Directive> | undefined) => this;
method setFieldExtension
setFieldExtension: ( fieldName: string, extensionName: string, value: unknown) => this;
method setFieldExtensions
setFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method setFields
setFields: (fields: InputTypeComposerFieldConfigMapDefinition) => this;
method setTypeName
setTypeName: (name: string) => this;
method toSDL
toSDL: ( opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[] }) => string;
class InterfaceTypeComposer
class InterfaceTypeComposer<TSource = any, TContext = any> {}
constructor
constructor( graphqlType: GraphQLInterfaceType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<InterfaceTypeComposer<TSource, TContext>>;
property NonNull
readonly NonNull: NonNullComposer<InterfaceTypeComposer<TSource, TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method addFieldArgs
addFieldArgs: ( fieldName: string, newArgs: ObjectTypeComposerArgumentConfigMapDefinition<any>) => this;
method addFields
addFields: ( newFields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>) => this;
method addInterface
addInterface: ( iface: | InterfaceTypeComposerDefinition<any, TContext> | InterfaceTypeComposerThunked<any, TContext>) => this;
method addInterfaces
addInterfaces: ( ifaces: ReadonlyArray< | InterfaceTypeComposerDefinition<any, TContext> | InterfaceTypeComposerThunked<any, TContext> >) => this;
method addTypeResolver
addTypeResolver: <TSrc>( type: ObjectTypeComposer<TSrc, TContext> | GraphQLObjectType, checkFn: InterfaceTypeComposerResolverCheckFn<TSrc, TContext>) => this;
method clearExtensions
clearExtensions: () => this;
method clearFieldArgExtensions
clearFieldArgExtensions: (fieldName: string, argName: string) => this;
method clearFieldExtensions
clearFieldExtensions: (fieldName: string) => this;
method clone
clone: ( newTypeNameOrTC: string | InterfaceTypeComposer<any, any>) => InterfaceTypeComposer<TSource, TContext>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => InterfaceTypeComposer<any, any>;
method create
static create: <TSrc = any, TCtx = any>( typeDef: InterfaceTypeComposerDefinition<TSrc, TCtx>, schemaComposer: SchemaComposer<TCtx>) => InterfaceTypeComposer<TSrc, TCtx>;
method createTemp
static createTemp: <TSrc = any, TCtx = any>( typeDef: InterfaceTypeComposerDefinition<TSrc, TCtx>, schemaComposer?: SchemaComposer<TCtx>) => InterfaceTypeComposer<TSrc, TCtx>;
method deprecateFields
deprecateFields: ( fields: string | string[] | { [fieldName: string]: string }) => this;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method extendField
extendField: ( fieldName: string, partialFieldConfig: Partial< ObjectTypeComposerFieldConfigAsObjectDefinition<TSource, TContext> >) => this;
method extendFieldArgExtensions
extendFieldArgExtensions: ( fieldName: string, argName: string, extensions: Extensions) => this;
method extendFieldExtensions
extendFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method get
get: (path: string | string[]) => TypeInPath<TContext> | void;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getField
getField: ( fieldName: string) => ObjectTypeComposerFieldConfig<TSource, TContext>;
method getFieldArg
getFieldArg: ( fieldName: string, argName: string) => ObjectTypeComposerArgumentConfig;
method getFieldArgDirectiveById
getFieldArgDirectiveById: ( fieldName: string, argName: string, idx: number) => DirectiveArgs | undefined;
method getFieldArgDirectiveByName
getFieldArgDirectiveByName: ( fieldName: string, argName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldArgDirectiveNames
getFieldArgDirectiveNames: (fieldName: string, argName: string) => string[];
method getFieldArgDirectives
getFieldArgDirectives: (fieldName: string, argName: string) => Array<Directive>;
method getFieldArgExtension
getFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => unknown;
method getFieldArgExtensions
getFieldArgExtensions: (fieldName: string, argName: string) => Extensions;
method getFieldArgITC
getFieldArgITC: ( fieldName: string, argName: string) => InputTypeComposer<TContext>;
method getFieldArgNames
getFieldArgNames: (fieldName: string) => string[];
method getFieldArgs
getFieldArgs: <TArgs = any>( fieldName: string) => ObjectTypeComposerArgumentConfigMap<TArgs>;
method getFieldArgTC
getFieldArgTC: ( fieldName: string, argName: string) => ComposeNamedInputType<TContext>;
method getFieldArgType
getFieldArgType: (fieldName: string, argName: string) => GraphQLInputType;
method getFieldArgTypeName
getFieldArgTypeName: (fieldName: string, argName: string) => string;
method getFieldConfig
getFieldConfig: (fieldName: string) => GraphQLFieldConfig<TSource, TContext>;
method getFieldDirectiveById
getFieldDirectiveById: ( fieldName: string, idx: number) => DirectiveArgs | undefined;
method getFieldDirectiveByName
getFieldDirectiveByName: ( fieldName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldDirectiveNames
getFieldDirectiveNames: (fieldName: string) => string[];
method getFieldDirectives
getFieldDirectives: (fieldName: string) => Array<Directive>;
method getFieldExtension
getFieldExtension: (fieldName: string, extensionName: string) => unknown;
method getFieldExtensions
getFieldExtensions: (fieldName: string) => Extensions;
method getFieldNames
getFieldNames: () => string[];
method getFieldOTC
getFieldOTC: (fieldName: string) => ObjectTypeComposer<TSource, TContext>;
method getFields
getFields: () => ObjectTypeComposerFieldConfigMap<TSource, TContext>;
method getFieldTC
getFieldTC: (fieldName: string) => ComposeNamedOutputType<TContext>;
method getFieldType
getFieldType: (fieldName: string) => GraphQLOutputType;
method getFieldTypeName
getFieldTypeName: (fieldName: string) => string;
method getInputType
getInputType: () => GraphQLInputObjectType;
method getInputTypeComposer
getInputTypeComposer: (opts?: ToInputTypeOpts) => InputTypeComposer<TContext>;
method getInterfaces
getInterfaces: () => Array<InterfaceTypeComposerThunked<TSource, TContext>>;
method getInterfacesTypes
getInterfacesTypes: () => Array<GraphQLInterfaceType>;
method getITC
getITC: (opts?: ToInputTypeOpts) => InputTypeComposer<TContext>;
method getNestedTCs
getNestedTCs: ( opts?: { exclude?: string[] }, passedTypes?: Set<NamedTypeComposer<any>>) => Set<NamedTypeComposer<any>>;
method getResolveType
getResolveType: () => GraphQLTypeResolver<TSource, TContext> | undefined | null;
method getType
getType: () => GraphQLInterfaceType;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<InterfaceTypeComposer<TSource, TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<InterfaceTypeComposer<TSource, TContext>>;
method getTypeResolverCheckFn
getTypeResolverCheckFn: ( type: ObjectTypeComposer<any, TContext> | GraphQLObjectType) => InterfaceTypeComposerResolverCheckFn<TSource, TContext>;
method getTypeResolverNames
getTypeResolverNames: () => string[];
method getTypeResolvers
getTypeResolvers: () => InterfaceTypeComposerResolversMap<TContext>;
method getTypeResolverTypes
getTypeResolverTypes: () => GraphQLObjectType[];
method hasExtension
hasExtension: (extensionName: string) => boolean;
method hasField
hasField: (fieldName: string) => boolean;
method hasFieldArg
hasFieldArg: (fieldName: string, argName: string) => boolean;
method hasFieldArgExtension
hasFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => boolean;
method hasFieldExtension
hasFieldExtension: (fieldName: string, extensionName: string) => boolean;
method hasInputTypeComposer
hasInputTypeComposer: () => boolean;
method hasInterface
hasInterface: (iface: InterfaceTypeComposerDefinition<any, TContext>) => boolean;
method hasTypeResolver
hasTypeResolver: ( type: ObjectTypeComposer<any, TContext> | GraphQLObjectType) => boolean;
method isFieldArgNonNull
isFieldArgNonNull: (fieldName: string, argName: string) => boolean;
method isFieldArgPlural
isFieldArgPlural: (fieldName: string, argName: string) => boolean;
method isFieldNonNull
isFieldNonNull: (fieldName: string) => boolean;
method isFieldPlural
isFieldPlural: (fieldName: string) => boolean;
method makeFieldArgNonNull
makeFieldArgNonNull: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgNonPlural
makeFieldArgNonPlural: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgNullable
makeFieldArgNullable: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgPlural
makeFieldArgPlural: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldNonNull
makeFieldNonNull: (fieldNameOrArray: string | string[]) => this;
method makeFieldNonPlural
makeFieldNonPlural: (fieldNameOrArray: string | string[]) => this;
method makeFieldNullable
makeFieldNullable: (fieldNameOrArray: string | string[]) => this;
method makeFieldPlural
makeFieldPlural: (fieldNameOrArray: string | string[]) => this;
method merge
merge: ( type: | GraphQLInterfaceType | GraphQLObjectType | InterfaceTypeComposer<any, any> | ObjectTypeComposer<any, any>) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeField
removeField: (fieldNameOrArray: string | string[]) => this;
method removeFieldArgExtension
removeFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => this;
method removeFieldExtension
removeFieldExtension: (fieldName: string, extensionName: string) => this;
method removeInputTypeComposer
removeInputTypeComposer: () => this;
method removeInterface
removeInterface: (iface: InterfaceTypeComposerDefinition<any, TContext>) => this;
method removeOtherFields
removeOtherFields: (fieldNameOrArray: string | string[]) => this;
method removeTypeResolver
removeTypeResolver: ( type: ObjectTypeComposer<any, TContext> | GraphQLObjectType) => this;
method reorderFields
reorderFields: (names: string[]) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined) => this;
method setField
setField: ( fieldName: string, fieldConfig: ObjectTypeComposerFieldConfigDefinition<TSource, TContext>) => this;
method setFieldArg
setFieldArg: ( fieldName: string, argName: string, argConfig: ObjectTypeComposerArgumentConfigDefinition) => this;
method setFieldArgDirectiveByName
setFieldArgDirectiveByName: ( fieldName: string, argName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldArgDirectives
setFieldArgDirectives: ( fieldName: string, argName: string, directives: Array<Directive>) => this;
method setFieldArgExtension
setFieldArgExtension: ( fieldName: string, argName: string, extensionName: string, value: unknown) => this;
method setFieldArgExtensions
setFieldArgExtensions: ( fieldName: string, argName: string, extensions: Extensions) => this;
method setFieldArgs
setFieldArgs: ( fieldName: string, args: ObjectTypeComposerArgumentConfigMapDefinition<any>) => this;
method setFieldDirectiveByName
setFieldDirectiveByName: ( fieldName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldDirectives
setFieldDirectives: ( fieldName: string, directives: Array<Directive> | undefined) => this;
method setFieldExtension
setFieldExtension: ( fieldName: string, extensionName: string, value: unknown) => this;
method setFieldExtensions
setFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method setFields
setFields: ( fields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>) => this;
method setInputTypeComposer
setInputTypeComposer: (itc: InputTypeComposer<TContext>) => this;
method setInterfaces
setInterfaces: ( interfaces: ReadonlyArray<InterfaceTypeComposerDefinition<any, TContext>>) => this;
method setResolveType
setResolveType: ( fn: GraphQLTypeResolver<TSource, TContext> | undefined | null) => this;
method setTypeName
setTypeName: (name: string) => this;
method setTypeResolverFallback
setTypeResolverFallback: ( type: ObjectTypeComposer<any, TContext> | GraphQLObjectType | null) => this;
method setTypeResolvers
setTypeResolvers: ( typeResolversMap: InterfaceTypeComposerResolversMap<TContext>) => this;
method toSDL
toSDL: ( opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[] }) => string;
class ListComposer
class ListComposer<T extends AnyTypeComposer<any> = AnyTypeComposer<any>> {}
constructor
constructor(type: AnyTypeComposer<any>);
property List
readonly List: ListComposer<ListComposer<T>>;
property NonNull
readonly NonNull: NonNullComposer<ListComposer<T>>;
property ofType
ofType: AnyTypeComposer<any>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => ListComposer<AnyTypeComposer<any>>;
method getType
getType: () => GraphQLList<any>;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<ListComposer<T>>;
method getTypePlural
getTypePlural: () => ListComposer<ListComposer<T>>;
method getUnwrappedTC
getUnwrappedTC: () => NamedTypeComposer<any>;
class NonNullComposer
class NonNullComposer<T extends AnyTypeComposer<any> = AnyTypeComposer<any>> {}
constructor
constructor(type: AnyTypeComposer<any>);
property List
readonly List: ListComposer<NonNullComposer<T>>;
property NonNull
readonly NonNull: NonNullComposer<T>;
property ofType
ofType: AnyTypeComposer<any>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => NonNullComposer<AnyTypeComposer<any>>;
method getType
getType: () => GraphQLNonNull<any>;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<T>;
method getTypePlural
getTypePlural: () => ListComposer<NonNullComposer<T>>;
method getUnwrappedTC
getUnwrappedTC: () => NamedTypeComposer<any>;
class ObjectTypeComposer
class ObjectTypeComposer<TSource = any, TContext = any> {}
constructor
constructor( graphqlType: GraphQLObjectType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<ObjectTypeComposer<TSource, TContext>>;
property NonNull
readonly NonNull: NonNullComposer<ObjectTypeComposer<TSource, TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method addFieldArgs
addFieldArgs: ( fieldName: string, newArgs: ObjectTypeComposerArgumentConfigMapDefinition<any>) => this;
method addFields
addFields: ( newFields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>) => this;
method addInterface
addInterface: ( iface: | InterfaceTypeComposerDefinition<any, TContext> | InterfaceTypeComposerThunked<any, TContext>) => this;
method addInterfaces
addInterfaces: ( ifaces: ReadonlyArray< | InterfaceTypeComposerDefinition<any, TContext> | InterfaceTypeComposerThunked<any, TContext> >) => this;
method addNestedFields
addNestedFields: ( newFields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>) => this;
method addRelation
addRelation: <TArgs extends Record<string, any> = any>( fieldName: string, opts: Readonly<ObjectTypeComposerRelationOpts<any, TSource, TContext, TArgs>>) => this;
method addResolver
addResolver: ( opts: Resolver<any, TContext> | ResolverDefinition<any, TContext>) => this;
method clearExtensions
clearExtensions: () => this;
method clearFieldArgExtensions
clearFieldArgExtensions: (fieldName: string, argName: string) => this;
method clearFieldExtensions
clearFieldExtensions: (fieldName: string) => this;
method clone
clone: ( newTypeNameOrTC: string | ObjectTypeComposer<any, any>) => ObjectTypeComposer<TSource, TContext>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => ObjectTypeComposer<any, any>;
method create
static create: <TSrc = any, TCtx = any>( typeDef: ObjectTypeComposerDefinition<TSrc, TCtx>, schemaComposer: SchemaComposer<TCtx>) => ObjectTypeComposer<TSrc, TCtx>;
method createTemp
static createTemp: <TSrc = any, TCtx = any>( typeDef: ObjectTypeComposerDefinition<TSrc, TCtx>, schemaComposer?: SchemaComposer<TCtx>) => ObjectTypeComposer<TSrc, TCtx>;
method deprecateFields
deprecateFields: ( fields: string | string[] | { [fieldName: string]: string }) => this;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method extendField
extendField: <TArgs = any>( fieldName: string, partialFieldConfig: Partial< ObjectTypeComposerFieldConfigAsObjectDefinition<TSource, TContext, TArgs> >) => this;
method extendFieldArgExtensions
extendFieldArgExtensions: ( fieldName: string, argName: string, extensions: Extensions) => this;
method extendFieldExtensions
extendFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method get
get: (path: string | string[]) => TypeInPath<TContext> | void;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getField
getField: <TArgs = any>( fieldName: string) => ObjectTypeComposerFieldConfig<TSource, TContext, TArgs>;
method getFieldArg
getFieldArg: ( fieldName: string, argName: string) => ObjectTypeComposerArgumentConfig;
method getFieldArgDirectiveById
getFieldArgDirectiveById: ( fieldName: string, argName: string, idx: number) => DirectiveArgs | undefined;
method getFieldArgDirectiveByName
getFieldArgDirectiveByName: ( fieldName: string, argName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldArgDirectiveNames
getFieldArgDirectiveNames: (fieldName: string, argName: string) => string[];
method getFieldArgDirectives
getFieldArgDirectives: (fieldName: string, argName: string) => Array<Directive>;
method getFieldArgExtension
getFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => unknown;
method getFieldArgExtensions
getFieldArgExtensions: (fieldName: string, argName: string) => Extensions;
method getFieldArgITC
getFieldArgITC: ( fieldName: string, argName: string) => InputTypeComposer<TContext>;
method getFieldArgNames
getFieldArgNames: (fieldName: string) => string[];
method getFieldArgs
getFieldArgs: <TArgs = any>( fieldName: string) => ObjectTypeComposerArgumentConfigMap<TArgs>;
method getFieldArgTC
getFieldArgTC: ( fieldName: string, argName: string) => ComposeNamedInputType<TContext>;
method getFieldArgType
getFieldArgType: (fieldName: string, argName: string) => GraphQLInputType;
method getFieldArgTypeName
getFieldArgTypeName: (fieldName: string, argName: string) => string;
method getFieldConfig
getFieldConfig: (fieldName: string) => GraphQLFieldConfig<TSource, TContext>;
method getFieldDirectiveById
getFieldDirectiveById: ( fieldName: string, idx: number) => DirectiveArgs | undefined;
method getFieldDirectiveByName
getFieldDirectiveByName: ( fieldName: string, directiveName: string) => DirectiveArgs | undefined;
method getFieldDirectiveNames
getFieldDirectiveNames: (fieldName: string) => string[];
method getFieldDirectives
getFieldDirectives: (fieldName: string) => Array<Directive>;
method getFieldExtension
getFieldExtension: (fieldName: string, extensionName: string) => unknown;
method getFieldExtensions
getFieldExtensions: (fieldName: string) => Extensions;
method getFieldNames
getFieldNames: () => string[];
method getFieldOTC
getFieldOTC: (fieldName: string) => ObjectTypeComposer<TSource, TContext>;
method getFields
getFields: () => ObjectTypeComposerFieldConfigMap<TSource, TContext>;
method getFieldTC
getFieldTC: (fieldName: string) => ComposeNamedOutputType<TContext>;
method getFieldType
getFieldType: (fieldName: string) => GraphQLOutputType;
method getFieldTypeName
getFieldTypeName: (fieldName: string) => string;
method getInputType
getInputType: () => GraphQLInputObjectType;
method getInputTypeComposer
getInputTypeComposer: (opts?: ToInputTypeOpts) => InputTypeComposer<TContext>;
method getInterfaces
getInterfaces: () => Array<InterfaceTypeComposerThunked<TSource, TContext>>;
method getInterfacesTypes
getInterfacesTypes: () => Array<GraphQLInterfaceType>;
method getIsTypeOf
getIsTypeOf: () => GraphQLIsTypeOfFn<TSource, TContext> | undefined | null;
method getITC
getITC: (opts?: ToInputTypeOpts) => InputTypeComposer<TContext>;
method getNestedTCs
getNestedTCs: ( opts?: { exclude?: string[] }, passedTypes?: Set<NamedTypeComposer<any>>) => Set<NamedTypeComposer<any>>;
method getRecordId
getRecordId: ( source: TSource, args?: Record<string, any>, context?: TContext) => string | number;
method getRecordIdFn
getRecordIdFn: () => ObjectTypeComposerGetRecordIdFn<TSource, TContext>;
method getRelations
getRelations: () => ObjectTypeComposerRelationMap<any, TContext>;
method getResolver
getResolver: <TArgs = any>( name: string, middlewares?: Array<ResolverMiddleware<TSource, TContext, TArgs>>) => Resolver<any, TContext, TArgs>;
method getResolvers
getResolvers: () => Map<string, Resolver<any, TContext, any>>;
method getType
getType: () => GraphQLObjectType;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<ObjectTypeComposer<TSource, TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<ObjectTypeComposer<TSource, TContext>>;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method hasField
hasField: (fieldName: string) => boolean;
method hasFieldArg
hasFieldArg: (fieldName: string, argName: string) => boolean;
method hasFieldArgExtension
hasFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => boolean;
method hasFieldExtension
hasFieldExtension: (fieldName: string, extensionName: string) => boolean;
method hasInputTypeComposer
hasInputTypeComposer: () => boolean;
method hasInterface
hasInterface: (iface: InterfaceTypeComposerDefinition<any, TContext>) => boolean;
method hasRecordIdFn
hasRecordIdFn: () => boolean;
method hasResolver
hasResolver: (name: string) => boolean;
method isFieldArgNonNull
isFieldArgNonNull: (fieldName: string, argName: string) => boolean;
method isFieldArgPlural
isFieldArgPlural: (fieldName: string, argName: string) => boolean;
method isFieldNonNull
isFieldNonNull: (fieldName: string) => boolean;
method isFieldPlural
isFieldPlural: (fieldName: string) => boolean;
method makeFieldArgNonNull
makeFieldArgNonNull: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgNonPlural
makeFieldArgNonPlural: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgNullable
makeFieldArgNullable: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldArgPlural
makeFieldArgPlural: ( fieldName: string, argNameOrArray: string | string[]) => this;
method makeFieldNonNull
makeFieldNonNull: (fieldNameOrArray: string | string[]) => this;
method makeFieldNonPlural
makeFieldNonPlural: (fieldNameOrArray: string | string[]) => this;
method makeFieldNullable
makeFieldNullable: (fieldNameOrArray: string | string[]) => this;
method makeFieldPlural
makeFieldPlural: (fieldNameOrArray: string | string[]) => this;
method merge
merge: ( type: | GraphQLObjectType | GraphQLInterfaceType | ObjectTypeComposer<any, any> | InterfaceTypeComposer<any, any>) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeField
removeField: (fieldNameOrArray: string | string[]) => this;
method removeFieldArg
removeFieldArg: (fieldName: string, argNameOrArray: string | string[]) => this;
method removeFieldArgExtension
removeFieldArgExtension: ( fieldName: string, argName: string, extensionName: string) => this;
method removeFieldExtension
removeFieldExtension: (fieldName: string, extensionName: string) => this;
method removeFieldOtherArgs
removeFieldOtherArgs: ( fieldName: string, argNameOrArray: string | string[]) => this;
method removeInputTypeComposer
removeInputTypeComposer: () => this;
method removeInterface
removeInterface: (iface: InterfaceTypeComposerDefinition<any, TContext>) => this;
method removeOtherFields
removeOtherFields: (fieldNameOrArray: string | string[]) => this;
method removeResolver
removeResolver: (resolverName: string) => this;
method reorderFields
reorderFields: (names: string[]) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined) => this;
method setField
setField: <TArgs = any>( fieldName: string, fieldConfig: ObjectTypeComposerFieldConfigDefinition< TSource, TContext, TArgs >) => this;
method setFieldArg
setFieldArg: ( fieldName: string, argName: string, argConfig: ObjectTypeComposerArgumentConfigDefinition) => this;
method setFieldArgDirectiveByName
setFieldArgDirectiveByName: ( fieldName: string, argName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldArgDirectives
setFieldArgDirectives: ( fieldName: string, argName: string, directives: Array<Directive>) => this;
method setFieldArgExtension
setFieldArgExtension: ( fieldName: string, argName: string, extensionName: string, value: unknown) => this;
method setFieldArgExtensions
setFieldArgExtensions: ( fieldName: string, argName: string, extensions: Extensions) => this;
method setFieldArgs
setFieldArgs: ( fieldName: string, args: ObjectTypeComposerArgumentConfigMapDefinition<any>) => this;
method setFieldDirectiveByName
setFieldDirectiveByName: ( fieldName: string, directiveName: string, args?: DirectiveArgs) => this;
method setFieldDirectives
setFieldDirectives: ( fieldName: string, directives: Array<Directive> | undefined) => this;
method setFieldExtension
setFieldExtension: ( fieldName: string, extensionName: string, value: unknown) => this;
method setFieldExtensions
setFieldExtensions: (fieldName: string, extensions: Extensions) => this;
method setFields
setFields: ( fields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>) => this;
method setInputTypeComposer
setInputTypeComposer: (itc: InputTypeComposer<TContext>) => this;
method setInterfaces
setInterfaces: ( interfaces: ReadonlyArray<InterfaceTypeComposerDefinition<any, TContext>>) => this;
method setIsTypeOf
setIsTypeOf: (fn: GraphQLIsTypeOfFn<any, any> | null | undefined) => this;
method setRecordIdFn
setRecordIdFn: (fn: ObjectTypeComposerGetRecordIdFn<TSource, TContext>) => this;
method setResolver
setResolver: (name: string, resolver: Resolver<any, TContext>) => this;
method setTypeName
setTypeName: (name: string) => this;
method toSDL
toSDL: ( opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[] }) => string;
method wrapResolver
wrapResolver: ( resolverName: string, cbResolver: ResolverWrapCb<any, TSource, TContext>) => this;
method wrapResolverAs
wrapResolverAs: ( resolverName: string, fromResolverName: string, cbResolver: ResolverWrapCb<any, TSource, TContext>) => this;
method wrapResolverResolve
wrapResolverResolve: ( resolverName: string, cbNextRp: ResolverNextRpCb<any, TContext>) => this;
class Resolver
class Resolver<TSource = any, TContext = any, TArgs = any, TReturn = any> {}
constructor
constructor( opts: ResolverDefinition<TSource, TContext, TArgs>, schemaComposer: SchemaComposer<TContext>);
property args
args: ObjectTypeComposerArgumentConfigMap<any>;
property deprecationReason
deprecationReason: string;
property description
description: string;
property directives
directives: Directive[];
property displayName
displayName: string;
property extensions
extensions: Extensions;
property kind
kind: ResolverKinds;
property name
name: string;
property parent
parent: Resolver<TSource, TContext, any, any>;
property projection
projection: ProjectionType;
property resolve
resolve: ResolverRpCbPartial<TSource, TContext, TArgs>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
property type
type: ComposeOutputType<TContext>;
method addArgs
addArgs: (newArgs: ObjectTypeComposerArgumentConfigMapDefinition<any>) => this;
method addFilterArg
addFilterArg: ( opts: ResolverFilterArgConfigDefinition<TSource, TContext, TArgs>) => this;
method addSortArg
addSortArg: (opts: ResolverSortArgConfig<TSource, TContext, TArgs>) => this;
method clearExtensions
clearExtensions: () => this;
method clone
clone: <TNewSource, TNewArgs>( opts?: Partial<ResolverDefinition<TNewSource, TContext, TNewArgs>>) => Resolver<TNewSource, TContext, TNewArgs>;
method cloneArg
cloneArg: (argName: string, newTypeName: string) => this;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => Resolver<any, any, any>;
method debug
debug: ( filterDotPaths?: { params?: string | string[] | undefined | null; payload?: string | string[] | undefined | null; }, opts?: ResolverDebugOpts) => Resolver<TSource, TContext, TArgs>;
method debugExecTime
debugExecTime: () => Resolver<TSource, TContext, TArgs>;
method debugParams
debugParams: ( filterPaths?: string | string[] | undefined | null, opts?: ResolverDebugOpts) => Resolver<TSource, TContext, TArgs>;
method debugPayload
debugPayload: ( filterPaths?: string | string[] | undefined | null, opts?: ResolverDebugOpts) => Resolver<TSource, TContext, TArgs>;
method extendArg
extendArg: ( argName: string, partialArgConfig: Partial<ObjectTypeComposerArgumentConfigAsObjectDefinition>) => this;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method get
get: (path: string | string[]) => TypeInPath<TContext> | void;
method getArg
getArg: (argName: string) => ObjectTypeComposerArgumentConfig;
method getArgConfig
getArgConfig: (argName: string) => GraphQLArgumentConfig;
method getArgITC
getArgITC: (argName: string) => InputTypeComposer<TContext>;
method getArgNames
getArgNames: () => string[];
method getArgs
getArgs: () => ObjectTypeComposerArgumentConfigMap<TArgs>;
method getArgTC
getArgTC: (argName: string) => ComposeNamedInputType<TContext>;
method getArgType
getArgType: (argName: string) => GraphQLInputType;
method getArgTypeName
getArgTypeName: (fieldName: string) => string;
method getDeprecationReason
getDeprecationReason: () => string | undefined | null;
method getDescription
getDescription: () => string | undefined;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getFieldConfig
getFieldConfig: (opts?: { projection?: ProjectionType;}) => GraphQLFieldConfig<TSource, TContext, TArgs>;
method getFieldResolver
getFieldResolver: (opts?: { projection?: ProjectionType;}) => GraphQLFieldResolver<TSource, TContext, TArgs>;
method getKind
getKind: () => ResolverKinds | void;
method getNestedName
getNestedName: () => string;
method getOTC
getOTC: () => ObjectTypeComposer<TReturn, TContext>;
method getResolve
getResolve: () => ResolverRpCb<TSource, TContext, TArgs>;
method getType
getType: () => GraphQLOutputType;
method getTypeComposer
getTypeComposer: () => ComposeNamedOutputType<TContext>;
method getTypeName
getTypeName: () => string;
method hasArg
hasArg: (argName: string) => boolean;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method isArgNonNull
isArgNonNull: (argName: string) => boolean;
method isArgPlural
isArgPlural: (argName: string) => boolean;
method makeArgNonNull
makeArgNonNull: (argNameOrArray: string | string[]) => this;
method makeArgNonPlural
makeArgNonPlural: (argNameOrArray: string | string[]) => this;
method makeArgNullable
makeArgNullable: (argNameOrArray: string | string[]) => this;
method makeArgPlural
makeArgPlural: (argNameOrArray: string | string[]) => this;
method makeOptional
makeOptional: (argNameOrArray: string | string[]) => this;
method makeRequired
makeRequired: (argNameOrArray: string | string[]) => this;
method removeArg
removeArg: (argNameOrArray: string | string[]) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeOtherArgs
removeOtherArgs: (argNameOrArray: string | string[]) => this;
method reorderArgs
reorderArgs: (names: string[]) => this;
method setArg
setArg: ( argName: string, argConfig: ObjectTypeComposerArgumentConfigDefinition) => this;
method setArgs
setArgs: <TNewArgs>( args: ObjectTypeComposerArgumentConfigMapDefinition<TNewArgs>) => Resolver<TSource, TContext, TNewArgs>;
method setArgType
setArgType: ( argName: string, typeDef: Thunk<ComposeInputTypeDefinition>) => this;
method setDeprecationReason
setDeprecationReason: (reason: string | undefined) => this;
method setDescription
setDescription: (description: string | undefined) => this;
method setDisplayName
setDisplayName: (name: string) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions) => this;
method setKind
setKind: (kind: string) => this;
method setResolve
setResolve: (resolve: ResolverRpCb<TSource, TContext, TArgs>) => this;
method setType
setType: <TNewReturn>( typeDef: ThunkWithSchemaComposer< | Readonly<ComposeOutputType<TContext>> | ComposeOutputTypeDefinition<TContext> | Readonly<Resolver<any, TContext, any>>, SchemaComposer<TContext> >) => Resolver<TSource, TContext, TArgs, TNewReturn>;
method toDebugStructure
toDebugStructure: () => Record<string, any>;
method toString
toString: () => string;
method withMiddlewares
withMiddlewares: ( middlewares: Array<ResolverMiddleware<TSource, TContext, TArgs>>) => Resolver<TSource, TContext, TArgs>;
method wrap
wrap: <TNewSource, TNewArgs>( cb?: ResolverWrapCb<TNewSource, TSource, TContext, TNewArgs, TArgs> | null, newResolverOpts?: Partial<ResolverDefinition<TNewSource, TContext, TNewArgs>>) => Resolver<TNewSource, TContext, TNewArgs>;
method wrapArgs
wrapArgs: <TNewArgs>( cb: ( prevArgs: GraphQLFieldConfigArgumentMap ) => ObjectTypeComposerArgumentConfigMapDefinition<TArgs>, wrapperName?: string) => Resolver<TSource, TContext, TNewArgs>;
method wrapCloneArg
wrapCloneArg: ( argName: string, newTypeName: string) => Resolver<TSource, TContext, TArgs>;
method wrapResolve
wrapResolve: ( cb: ResolverNextRpCb<TSource, TContext, TArgs>, wrapperName?: string) => Resolver<TSource, TContext, TArgs>;
method wrapType
wrapType: ( cb: ( prevType: ComposeOutputType<TContext> ) => ComposeOutputTypeDefinition<TContext>, wrapperName?: string) => Resolver<TSource, TContext, TArgs>;
class ScalarTypeComposer
class ScalarTypeComposer<TContext = any> {}
constructor
constructor( graphqlType: GraphQLScalarType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<ScalarTypeComposer<TContext>>;
property NonNull
readonly NonNull: NonNullComposer<ScalarTypeComposer<TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method clearExtensions
clearExtensions: () => this;
method clone
clone: ( newTypeNameOrTC: string | ScalarTypeComposer<any>) => ScalarTypeComposer<TContext>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => ScalarTypeComposer<any>;
method create
static create: <TCtx = any, TInternal = any, TExternal = any>( typeDef: ScalarTypeComposerDefinition<TInternal, TExternal>, schemaComposer: SchemaComposer<TCtx>) => ScalarTypeComposer<TCtx>;
method createTemp
static createTemp: <TCtx = any, TInternal = any, TExternal = any>( typeDef: ScalarTypeComposerDefinition<TInternal, TExternal>, schemaComposer?: SchemaComposer<TCtx>) => ScalarTypeComposer<TCtx>;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getParseLiteral
getParseLiteral: () => GraphQLScalarLiteralParser<any> | undefined;
method getParseValue
getParseValue: () => GraphQLScalarValueParser<any> | undefined;
method getSerialize
getSerialize: () => GraphQLScalarSerializer<any>;
method getSpecifiedByUrl
getSpecifiedByUrl: () => string | undefined | null;
method getType
getType: () => GraphQLScalarType;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<ScalarTypeComposer<TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<ScalarTypeComposer<TContext>>;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method merge
merge: ( type: GraphQLScalarType | ScalarTypeComposer<any>) => ScalarTypeComposer<TContext>;
method removeExtension
removeExtension: (extensionName: string) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined | null) => this;
method setParseLiteral
setParseLiteral: (fn: GraphQLScalarLiteralParser<any> | undefined) => this;
method setParseValue
setParseValue: (fn: GraphQLScalarValueParser<any> | undefined) => this;
method setSerialize
setSerialize: (fn: GraphQLScalarSerializer<any>) => this;
method setSpecifiedByUrl
setSpecifiedByUrl: (url: string | undefined | null) => this;
method setTypeName
setTypeName: (name: string) => this;
method toSDL
toSDL: (opts?: SchemaPrinterOptions) => string;
class SchemaComposer
class SchemaComposer<TContext = any> extends TypeStorage< any, NamedTypeComposer<TContext>> {}
constructor
constructor(schemaOrSDL?: any);
property Mutation
readonly Mutation: ObjectTypeComposer<any, TContext>;
property Query
readonly Query: ObjectTypeComposer<any, TContext>;
property Subscription
readonly Subscription: ObjectTypeComposer<any, TContext>;
property typeMapper
typeMapper: TypeMapper<TContext>;
method add
add: ( typeOrSDL: ComposeOutputTypeDefinition<any> | ComposeInputTypeDefinition) => string;
method addAsComposer
addAsComposer: ( typeOrSDL: ComposeOutputTypeDefinition<any> | ComposeInputTypeDefinition) => string;
method addDirective
addDirective: (directive: GraphQLDirective) => this;
method addResolveMethods
addResolveMethods: ( typesFieldsResolve: GraphQLToolsResolveMethods<TContext>) => void;
method addSchemaMustHaveType
addSchemaMustHaveType: (type: AnyType<TContext>) => this;
method addTypeDefs
addTypeDefs: (typeDefs: string) => TypeStorage<string, NamedTypeComposer<any>>;
method buildSchema
buildSchema: (extraConfig?: ExtraSchemaConfig) => GraphQLSchema;
method clear
clear: () => void;
method clone
clone: () => SchemaComposer<any>;
method createEnumTC
createEnumTC: ( typeDef: EnumTypeComposerDefinition) => EnumTypeComposer<TContext>;
method createInputTC
createInputTC: ( typeDef: InputTypeComposerDefinition) => InputTypeComposer<TContext>;
method createInterfaceTC
createInterfaceTC: <TSource = any>( typeDef: InterfaceTypeComposerDefinition<TSource, TContext>) => InterfaceTypeComposer<TSource, TContext>;
method createObjectTC
createObjectTC: <TSource = any>( typeDef: ObjectTypeComposerDefinition<TSource, TContext>) => ObjectTypeComposer<TSource, TContext>;
method createResolver
createResolver: <TSource = any, TArgs = any>( opts: ResolverDefinition<TSource, TContext, TArgs>) => Resolver<any, TContext>;
method createScalarTC
createScalarTC: <TInternal = any, TExternal = any>( typeDef: ScalarTypeComposerDefinition<TInternal, TExternal>) => ScalarTypeComposer<TContext>;
method createTC
createTC: ( typeOrSDL: ComposeOutputTypeDefinition<any> | ComposeInputTypeDefinition) => NamedTypeComposer<TContext>;
method createTempTC
createTempTC: ( typeOrSDL: ComposeOutputTypeDefinition<any> | ComposeInputTypeDefinition) => NamedTypeComposer<TContext>;
method createUnionTC
createUnionTC: <TSource = any>( typeDef: UnionTypeComposerDefinition<TSource, TContext>) => UnionTypeComposer<TSource, TContext>;
method getAnyTC
getAnyTC: ( typeOrName: string | AnyType<any> | GraphQLType) => NamedTypeComposer<TContext>;
method getDescription
getDescription: () => string | undefined;
method getDirective
getDirective: (name: string) => GraphQLDirective;
method getDirectives
getDirectives: () => Array<GraphQLDirective>;
method getETC
getETC: (typeName: unknown) => EnumTypeComposer<TContext>;
method getIFTC
getIFTC: (typeName: unknown) => InterfaceTypeComposer<any, TContext>;
method getITC
getITC: (typeName: unknown) => InputTypeComposer<TContext>;
method getOrCreateETC
getOrCreateETC: ( typeName: string, onCreate?: (tc: EnumTypeComposer<TContext>) => any) => EnumTypeComposer<TContext>;
method getOrCreateIFTC
getOrCreateIFTC: ( typeName: string, onCreate?: (tc: InterfaceTypeComposer<any, TContext>) => any) => InterfaceTypeComposer<any, TContext>;
method getOrCreateITC
getOrCreateITC: ( typeName: string, onCreate?: (tc: InputTypeComposer<TContext>) => any) => InputTypeComposer<TContext>;
method getOrCreateOTC
getOrCreateOTC: ( typeName: string, onCreate?: (tc: ObjectTypeComposer<any, TContext>) => any) => ObjectTypeComposer<any, TContext>;
method getOrCreateSTC
getOrCreateSTC: ( typeName: string, onCreate?: (tc: ScalarTypeComposer<TContext>) => any) => ScalarTypeComposer<TContext>;
method getOrCreateTC
getOrCreateTC: ( typeName: string, onCreate?: (tc: ObjectTypeComposer<any, TContext>) => any) => ObjectTypeComposer<any, TContext>;
method getOrCreateUTC
getOrCreateUTC: ( typeName: string, onCreate?: (tc: UnionTypeComposer<any, TContext>) => any) => UnionTypeComposer<any, TContext>;
method getOTC
getOTC: (typeName: unknown) => ObjectTypeComposer<any, TContext>;
method getResolveMethods
getResolveMethods: (opts?: { exclude?: string[] | null;}) => GraphQLToolsResolveMethods<TContext>;
method getSTC
getSTC: (typeName: unknown) => ScalarTypeComposer<TContext>;
method getTypeSDL
getTypeSDL: ( typeName: string, opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[] }) => string;
method getUTC
getUTC: (typeName: unknown) => UnionTypeComposer<any, TContext>;
method hasDirective
hasDirective: (directive: string | GraphQLDirective) => boolean;
method inspect
inspect: () => string;
method isEnumType
isEnumType: (type: string | AnyType<any> | GraphQLType) => boolean;
method isInputObjectType
isInputObjectType: (type: string | AnyType<any> | GraphQLType) => boolean;
method isInterfaceType
isInterfaceType: (type: string | AnyType<any> | GraphQLType) => boolean;
method isObjectType
isObjectType: (type: string | AnyType<any> | GraphQLType) => boolean;
method isScalarType
isScalarType: (type: string | AnyType<any> | GraphQLType) => boolean;
method isUnionType
isUnionType: (type: string | AnyType<any> | GraphQLType) => boolean;
method merge
merge: (schema: GraphQLSchema | SchemaComposer<any>) => this;
method removeDirective
removeDirective: (directive: GraphQLDirective) => this;
method removeEmptyTypes
removeEmptyTypes: ( tc: ObjectTypeComposer<any, TContext>, passedTypes?: Set<string>) => void;
method set
set: (key: unknown, value: NamedTypeComposer<TContext>) => this;
method setDescription
setDescription: (description: string | undefined) => this;
method toJSON
toJSON: () => string;
method toSDL
toSDL: (options?: SchemaComposerPrinterOptions) => string;
method toString
toString: () => string;
class ThunkComposer
class ThunkComposer< T extends NamedTypeComposer<any> = NamedTypeComposer<any>, G extends GraphQLType = GraphQLType> {}
constructor
constructor(thunk: () => T, typeName?: string);
property List
readonly List: ListComposer<ThunkComposer<T, G>>;
property NonNull
readonly NonNull: NonNullComposer<ThunkComposer<T, G>>;
property ofType
readonly ofType: NamedTypeComposer<any>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => ThunkComposer<NamedTypeComposer<any>, G>;
method getType
getType: () => G;
method getTypeName
getTypeName: () => string;
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<ThunkComposer<T, G>>;
method getTypePlural
getTypePlural: () => ListComposer<ThunkComposer<T, G>>;
method getUnwrappedTC
getUnwrappedTC: () => T;
class TypeMapper
class TypeMapper<TContext = any> {}
constructor
constructor(schemaComposer: SchemaComposer<TContext>);
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method buildWrappedTypeDef
buildWrappedTypeDef: ( innerType: AnyTypeComposer<any>, inputTypeAST: TypeNode) => AnyTypeComposer<TContext>;
method checkSchemaDef
checkSchemaDef: (def: SchemaDefinitionNode) => void;
method convertArgConfig
convertArgConfig: ( composeAC: ObjectTypeComposerArgumentConfigDefinition, argName?: string, fieldName?: string, typeName?: string) => ObjectTypeComposerArgumentConfig;
method convertArgConfigMap
convertArgConfigMap: ( composeArgsConfigMap: ObjectTypeComposerArgumentConfigMapDefinition<any>, fieldName?: string, typeName?: string) => ObjectTypeComposerArgumentConfigMap<any>;
method convertGraphQLTypeToComposer
convertGraphQLTypeToComposer: (type: GraphQLType) => AnyTypeComposer<TContext>;
method convertInputFieldConfig
convertInputFieldConfig: ( composeIFC: InputTypeComposerFieldConfigDefinition, fieldName?: string, typeName?: string) => InputTypeComposerFieldConfig;
method convertInputFieldConfigMap
convertInputFieldConfigMap: ( composeFields: InputTypeComposerFieldConfigMapDefinition, typeName?: string) => InputTypeComposerFieldConfigMap;
method convertInputTypeDefinition
convertInputTypeDefinition: ( typeDef: ThunkWithSchemaComposer< ComposeInputTypeDefinition, SchemaComposer<TContext> >, fieldName?: string, typeName?: string) => ComposeInputType | void;
method convertInterfaceTypeDefinition
convertInterfaceTypeDefinition: ( typeDef: InterfaceTypeComposerDefinition<any, TContext>) => InterfaceTypeComposerThunked<any, TContext>;
method convertOutputFieldConfig
convertOutputFieldConfig: <TSource>( composeFC: | ObjectTypeComposerFieldConfigDefinition<TSource, TContext> | Readonly<Resolver<any, TContext>>, fieldName?: string, typeName?: string) => ObjectTypeComposerFieldConfig<TSource, TContext>;
method convertOutputFieldConfigMap
convertOutputFieldConfigMap: <TSource>( composeFields: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>, typeName?: string) => ObjectTypeComposerFieldConfigMap<TSource, TContext>;
method convertOutputTypeDefinition
convertOutputTypeDefinition: ( typeDef: ThunkWithSchemaComposer< | ComposeOutputTypeDefinition<any> | ObjectTypeComposerDefinition<any, any> | Readonly<Resolver<any, any>>, SchemaComposer<TContext> >, fieldName?: string, typeName?: string) => ComposeOutputType<TContext> | void;
method convertSDLTypeDefinition
convertSDLTypeDefinition: ( str: TypeDefinitionString) => NamedTypeComposer<TContext> | void;
method convertSDLWrappedTypeName
convertSDLWrappedTypeName: ( str: TypeWrappedString | TypeNameString) => AnyTypeComposer<TContext>;
method getBuiltInType
getBuiltInType: (name: string) => ScalarTypeComposer<TContext> | undefined;
method getDeprecationReason
getDeprecationReason: ( directives: ReadonlyArray<DirectiveNode> | undefined) => string | undefined;
method getNamedTypeAST
getNamedTypeAST: (typeAST: TypeNode) => NamedTypeNode;
method isEnumTypeDefinitionString
static isEnumTypeDefinitionString: (str: string) => boolean;
method isInputType
static isInputType: (type: unknown) => boolean;
method isInputTypeDefinitionString
static isInputTypeDefinitionString: (str: string) => boolean;
method isInterfaceTypeDefinitionString
static isInterfaceTypeDefinitionString: (str: string) => boolean;
method isOutputType
static isOutputType: (type: unknown) => boolean;
method isOutputTypeDefinitionString
static isOutputTypeDefinitionString: (str: string) => boolean;
method isScalarTypeDefinitionString
static isScalarTypeDefinitionString: (str: string) => boolean;
method isTypeDefinitionString
static isTypeDefinitionString: (str: string) => boolean;
method isTypeNameString
static isTypeNameString: (str: string) => boolean;
method isUnionTypeDefinitionString
static isUnionTypeDefinitionString: (str: string) => boolean;
method makeArguments
makeArguments: ( values?: ReadonlyArray<InputValueDefinitionNode>) => ObjectTypeComposerArgumentConfigMap<any>;
method makeDirectiveDef
makeDirectiveDef: (def: DirectiveDefinitionNode) => GraphQLDirective;
method makeEnumDef
makeEnumDef: (def: EnumTypeDefinitionNode) => EnumTypeComposer<TContext>;
method makeEnumValuesDef
makeEnumValuesDef: ( def: EnumTypeDefinitionNode | EnumTypeExtensionNode) => EnumTypeComposerValueConfigMapDefinition;
method makeExtendEnumDef
makeExtendEnumDef: (def: EnumTypeExtensionNode) => EnumTypeComposer<TContext>;
method makeExtendInputObjectDef
makeExtendInputObjectDef: ( def: InputObjectTypeExtensionNode) => InputTypeComposer<TContext>;
method makeExtendInterfaceDef
makeExtendInterfaceDef: ( def: InterfaceTypeExtensionNode) => InterfaceTypeComposer<any, TContext>;
method makeExtendScalarDef
makeExtendScalarDef: ( def: ScalarTypeExtensionNode) => ScalarTypeComposer<TContext>;
method makeExtendTypeDef
makeExtendTypeDef: ( def: ObjectTypeExtensionNode) => ObjectTypeComposer<any, TContext>;
method makeExtendUnionDef
makeExtendUnionDef: ( def: UnionTypeExtensionNode) => UnionTypeComposer<any, TContext>;
method makeFieldDefMap
makeFieldDefMap: ( def: | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode) => ObjectTypeComposerFieldConfigMap<any, any>;
method makeImplementedInterfaces
makeImplementedInterfaces: ( def: | ObjectTypeDefinitionNode | ObjectTypeExtensionNode | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode) => Array<InterfaceTypeComposerThunked<any, TContext>>;
method makeInputFieldDef
makeInputFieldDef: ( def: InputObjectTypeDefinitionNode | InputObjectTypeExtensionNode) => InputTypeComposerFieldConfigMapDefinition;
method makeInputObjectDef
makeInputObjectDef: ( def: InputObjectTypeDefinitionNode) => InputTypeComposer<TContext>;
method makeInterfaceDef
makeInterfaceDef: ( def: InterfaceTypeDefinitionNode) => InterfaceTypeComposer<any, TContext>;
method makeScalarDef
makeScalarDef: (def: ScalarTypeDefinitionNode) => ScalarTypeComposer<TContext>;
method makeSchemaDef
makeSchemaDef: (def: DefinitionNode) => NamedTypeComposer<any> | null;
method makeTypeDef
makeTypeDef: ( def: ObjectTypeDefinitionNode) => ObjectTypeComposer<any, TContext>;
method makeUnionDef
makeUnionDef: (def: UnionTypeDefinitionNode) => UnionTypeComposer<any, TContext>;
method parseDirectives
parseDirectives: ( directives: ReadonlyArray<DirectiveNode> | undefined) => Array<Directive>;
method parseTypes
parseTypes: (astDocument: DocumentNode) => Array<NamedTypeComposer<TContext>>;
method parseTypesFromString
parseTypesFromString: ( str: string) => TypeStorage<string, NamedTypeComposer<TContext>>;
method typeFromAST
typeFromAST: (typeNode: TypeNode) => AnyTypeComposer<TContext>;
method typeFromASTInput
typeFromASTInput: (typeNode: TypeNode) => ComposeInputType;
method typeFromASTOutput
typeFromASTOutput: (typeNode: TypeNode) => ComposeOutputType<TContext>;
class TypeStorage
class TypeStorage<K = any, V = any> {}
constructor
constructor();
property size
readonly size: number;
property types
types: Map<string | K, V>;
method add
add: (value: V) => string | null;
method clear
clear: () => void;
method delete
delete: (typeName: K) => boolean;
method entries
entries: () => Iterator<[K | string, V]>;
method forEach
forEach: ( callbackfn: ( value: V, index: K | string, map: Map<K | string, V> ) => unknown, thisArg?: any) => void;
method get
get: (typeName: K) => V;
method getOrSet
getOrSet: (typeName: K, typeOrThunk: V | ((schemaComposer: this) => V)) => V;
method has
has: (typeName: K) => boolean;
method hasInstance
hasInstance: (typeName: K, ClassObj: any) => boolean;
method keys
keys: () => Iterator<K | string>;
method set
set: (typeName: K | string, value: V) => TypeStorage<K, V>;
method values
values: () => Iterator<V>;
class UnionTypeComposer
class UnionTypeComposer<TSource = any, TContext = any> {}
constructor
constructor( graphqlType: GraphQLUnionType, schemaComposer: SchemaComposer<TContext>);
property List
readonly List: ListComposer<UnionTypeComposer<TSource, TContext>>;
property NonNull
readonly NonNull: NonNullComposer<UnionTypeComposer<TSource, TContext>>;
property schemaComposer
schemaComposer: SchemaComposer<TContext>;
method addType
addType: ( type: | ObjectTypeComposerThunked<any, TContext> | ObjectTypeComposerDefinition<any, TContext>) => this;
method addTypeResolver
addTypeResolver: ( type: ObjectTypeComposerDefinition<any, TContext>, checkFn: UnionTypeComposerResolverCheckFn<TSource, TContext>) => this;
method addTypes
addTypes: ( types: ReadonlyArray< | ObjectTypeComposerThunked<any, TContext> | ObjectTypeComposerDefinition<any, TContext> >) => this;
method clearExtensions
clearExtensions: () => this;
method clearTypes
clearTypes: () => this;
method clone
clone: ( newTypeNameOrTC: string | UnionTypeComposer<any, any>) => UnionTypeComposer<any, TContext>;
method cloneTo
cloneTo: ( anotherSchemaComposer: SchemaComposer<any>, cloneMap?: Map<any, any>) => UnionTypeComposer<any, any>;
method create
static create: <TSrc = any, TCtx = any>( typeDef: UnionTypeComposerDefinition<TSrc, TCtx>, schemaComposer: SchemaComposer<TCtx>) => UnionTypeComposer<TSrc, TCtx>;
method createTemp
static createTemp: <TSrc = any, TCtx = any>( typeDef: UnionTypeComposerDefinition<TSrc, TCtx>, schemaComposer?: SchemaComposer<TCtx>) => UnionTypeComposer<TSrc, TCtx>;
method extendExtensions
extendExtensions: (extensions: Extensions) => this;
method getDescription
getDescription: () => string;
method getDirectiveById
getDirectiveById: (idx: number) => DirectiveArgs | undefined;
method getDirectiveByName
getDirectiveByName: (directiveName: string) => DirectiveArgs | undefined;
method getDirectiveNames
getDirectiveNames: () => string[];
method getDirectives
getDirectives: () => Array<Directive>;
method getExtension
getExtension: (extensionName: string) => unknown;
method getExtensions
getExtensions: () => Extensions;
method getNestedTCs
getNestedTCs: ( opts?: { exclude?: string[] | undefined }, passedTypes?: Set<NamedTypeComposer<any>>) => Set<NamedTypeComposer<any>>;
method getResolveType
getResolveType: () => GraphQLTypeResolver<TSource, TContext> | undefined | null;
method getType
getType: () => GraphQLUnionType;
method getTypeComposers
getTypeComposers: () => Array<ObjectTypeComposer<TSource, TContext>>;
method getTypeName
getTypeName: () => string;
method getTypeNames
getTypeNames: () => string[];
method getTypeNonNull
getTypeNonNull: () => NonNullComposer<UnionTypeComposer<TSource, TContext>>;
method getTypePlural
getTypePlural: () => ListComposer<UnionTypeComposer<TSource, TContext>>;
method getTypeResolverCheckFn
getTypeResolverCheckFn: ( type: | ObjectTypeComposerThunked<any, TContext> | ObjectTypeComposerDefinition<any, TContext>) => UnionTypeComposerResolverCheckFn<any, TContext>;
method getTypeResolverNames
getTypeResolverNames: () => string[];
method getTypeResolvers
getTypeResolvers: () => UnionTypeComposerResolversMap<TSource, TContext>;
method getTypeResolverTypes
getTypeResolverTypes: () => Array<ObjectTypeComposerThunked<any, TContext>>;
method getTypes
getTypes: () => Array<ObjectTypeComposerThunked<TSource, TContext>>;
method hasExtension
hasExtension: (extensionName: string) => boolean;
method hasType
hasType: (name: ObjectTypeComposerDefinition<any, TContext>) => boolean;
method hasTypeResolver
hasTypeResolver: ( type: | ObjectTypeComposerThunked<any, TContext> | ObjectTypeComposerDefinition<any, TContext>) => boolean;
method merge
merge: (type: GraphQLUnionType | UnionTypeComposer<any, any>) => this;
method removeExtension
removeExtension: (extensionName: string) => this;
method removeOtherTypes
removeOtherTypes: (nameOrArray: string | string[]) => this;
method removeType
removeType: (nameOrArray: string | string[]) => this;
method removeTypeResolver
removeTypeResolver: (type: ObjectTypeComposerDefinition<any, TContext>) => this;
method setDescription
setDescription: (description: string) => this;
method setDirectiveByName
setDirectiveByName: (directiveName: string, args?: DirectiveArgs) => this;
method setDirectives
setDirectives: (directives: Array<Directive>) => this;
method setExtension
setExtension: (extensionName: string, value: unknown) => this;
method setExtensions
setExtensions: (extensions: Extensions | undefined) => this;
method setResolveType
setResolveType: ( fn: GraphQLTypeResolver<TSource, TContext> | undefined | null) => this;
method setTypeName
setTypeName: (name: string) => this;
method setTypeResolverFallback
setTypeResolverFallback: ( type: ObjectTypeComposer<any, TContext> | GraphQLObjectType | null) => this;
method setTypeResolvers
setTypeResolvers: ( typeResolversMap: UnionTypeComposerResolversMapDefinition<TSource, TContext>) => this;
method setTypes
setTypes: ( types: ReadonlyArray< | ObjectTypeComposerThunked<TSource, TContext> | ObjectTypeComposerDefinition<any, TContext> >) => this;
method toSDL
toSDL: ( opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[] }) => string;
Type Aliases
type AnyType
type AnyType<TContext> = NamedTypeComposer<TContext> | GraphQLNamedType;
type AnyTypeComposer
type AnyTypeComposer<TContext> = | NamedTypeComposer<TContext> | ListComposer<any> | NonNullComposer<any> | ThunkComposer<any, any>;
type ComposeInputType
type ComposeInputType = | ComposeNamedInputType<any> | ThunkComposer<ComposeNamedInputType<any>, GraphQLInputType> | NonNullComposer< | ComposeNamedInputType<any> | ThunkComposer<ComposeNamedInputType<any>, GraphQLInputType> | ListComposer<any> > | ListComposer< | ComposeNamedInputType<any> | ThunkComposer<ComposeNamedInputType<any>, GraphQLInputType> | ListComposer<any> | NonNullComposer<any> >;
type ComposeInputTypeDefinition
type ComposeInputTypeDefinition = | TypeAsString | Readonly<ComposeInputType> | Readonly<GraphQLInputType> | ReadonlyArray< | TypeAsString | Readonly<ComposeInputType> | Readonly<GraphQLInputType> | ReadonlyArray< | TypeAsString | Readonly<ComposeInputType> | Readonly<GraphQLInputType> > >;
type ComposeNamedInputType
type ComposeNamedInputType<TContext> = | InputTypeComposer<TContext> | EnumTypeComposer<TContext> | ScalarTypeComposer<TContext>;
type ComposeNamedOutputType
type ComposeNamedOutputType<TContext> = | ObjectTypeComposer<any, TContext> | EnumTypeComposer<TContext> | ScalarTypeComposer<TContext> | InterfaceTypeComposer<any, TContext> | UnionTypeComposer<any, TContext>;
type ComposeOutputType
type ComposeOutputType<TContext> = | ComposeNamedOutputType<TContext> | NonNullComposer<any> | ListComposer<any> | ThunkComposer<any, GraphQLOutputType>;
type ComposeOutputTypeDefinition
type ComposeOutputTypeDefinition<TContext> = | Readonly<ComposeOutputType<TContext>> | Readonly<GraphQLOutputType> | TypeAsString | ReadonlyArray< | Readonly<ComposeOutputType<TContext>> | Readonly<GraphQLOutputType> | TypeAsString | ReadonlyArray< | Readonly<ComposeOutputType<TContext>> | Readonly<GraphQLOutputType> | TypeAsString > >;
type Directive
type Directive = { name: string; args?: DirectiveArgs;};
type DirectiveArgs
type DirectiveArgs = { [key: string]: any;};
type EnumTypeComposerAsObjectDefinition
type EnumTypeComposerAsObjectDefinition = { name: string; values?: EnumTypeComposerValueConfigMapDefinition; description?: string | null; extensions?: Extensions; directives?: Directive[];};
type EnumTypeComposerDefinition
type EnumTypeComposerDefinition = | TypeAsString | EnumTypeComposerAsObjectDefinition | GraphQLEnumType;
type EnumTypeComposerValueConfig
type EnumTypeComposerValueConfig = { value: any; deprecationReason?: string | null; description?: string | null; astNode?: EnumValueDefinitionNode | null | undefined; extensions?: Extensions; directives?: Directive[]; [key: string]: any;};
type EnumTypeComposerValueConfigDefinition
type EnumTypeComposerValueConfigDefinition = { value?: any; deprecationReason?: string | null; description?: string | null; extensions?: Extensions; directives?: Directive[]; [key: string]: any;};
type EnumTypeComposerValueConfigMap
type EnumTypeComposerValueConfigMap = ObjMap<EnumTypeComposerValueConfig>;
type EnumTypeComposerValueConfigMapDefinition
type EnumTypeComposerValueConfigMapDefinition = ObjMapReadOnly<EnumTypeComposerValueConfigDefinition>;
type Extensions
type Extensions = { [key: string]: any; directives?: Directive[];};
type InputTypeComposerAsObjectDefinition
type InputTypeComposerAsObjectDefinition = { name: string; fields: ThunkWithSchemaComposer< InputTypeComposerFieldConfigMapDefinition, SchemaComposer<any> >; description?: null | string; extensions?: Extensions; directives?: Directive[];};
type InputTypeComposerDefinition
type InputTypeComposerDefinition = | TypeAsString | TypeDefinitionString | InputTypeComposerAsObjectDefinition | Readonly<GraphQLInputObjectType>;
type InputTypeComposerFieldConfig
type InputTypeComposerFieldConfig = { type: ComposeInputType; defaultValue?: unknown; description?: string | null; astNode?: InputValueDefinitionNode | null; extensions?: Extensions; directives?: Directive[]; [key: string]: unknown;};
type InputTypeComposerFieldConfigAsObjectDefinition
type InputTypeComposerFieldConfigAsObjectDefinition = { type: ThunkWithSchemaComposer<ComposeInputTypeDefinition, SchemaComposer<any>>; defaultValue?: unknown; description?: string | null; extensions?: Extensions; directives?: Directive[]; [key: string]: unknown;};
type InputTypeComposerFieldConfigDefinition
type InputTypeComposerFieldConfigDefinition = | ThunkWithSchemaComposer< InputTypeComposerFieldConfigAsObjectDefinition, SchemaComposer<any> > | ThunkWithSchemaComposer<ComposeInputTypeDefinition, SchemaComposer<any>>;
type InputTypeComposerFieldConfigMap
type InputTypeComposerFieldConfigMap = ObjMap<InputTypeComposerFieldConfig>;
type InputTypeComposerFieldConfigMapDefinition
type InputTypeComposerFieldConfigMapDefinition = ObjMap<InputTypeComposerFieldConfigDefinition>;
type InputTypeComposerThunked
type InputTypeComposerThunked<TContext> = | InputTypeComposer<TContext> | ThunkComposer<InputTypeComposer<TContext>, GraphQLInputType>;
type InterfaceTypeComposerAsObjectDefinition
type InterfaceTypeComposerAsObjectDefinition<TSource, TContext> = { name: string; fields?: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>; interfaces?: null | ThunkWithSchemaComposer< ReadonlyArray<InterfaceTypeComposerDefinition<any, TContext>>, SchemaComposer<TContext> >; resolveType?: null | GraphQLTypeResolver<TSource, TContext>; description?: null | string; extensions?: Extensions; directives?: Directive[];};
type InterfaceTypeComposerDefinition
type InterfaceTypeComposerDefinition<TSource, TContext> = | TypeAsString | TypeDefinitionString | InterfaceTypeComposerAsObjectDefinition<TSource, TContext> | GraphQLInterfaceType | Readonly<InterfaceTypeComposerThunked<any, TContext>>;
type InterfaceTypeComposerResolverCheckFn
type InterfaceTypeComposerResolverCheckFn<TSource, TContext> = ( value: TSource, context: TContext, info: GraphQLResolveInfo) => MaybePromise<boolean | null | void>;
type InterfaceTypeComposerResolversMap
type InterfaceTypeComposerResolversMap<TContext> = Map< ObjectTypeComposer<any, TContext> | GraphQLObjectType, InterfaceTypeComposerResolverCheckFn<any, TContext>>;
type InterfaceTypeComposerThunked
type InterfaceTypeComposerThunked<TReturn, TContext> = | InterfaceTypeComposer<TReturn, TContext> | ThunkComposer<InterfaceTypeComposer<any, any>, GraphQLInterfaceType>;
type MaybePromise
type MaybePromise<T> = Promise<T> | T;
type NamedTypeComposer
type NamedTypeComposer<TContext> = | ObjectTypeComposer<any, TContext> | InputTypeComposer<TContext> | EnumTypeComposer<TContext> | InterfaceTypeComposer<any, TContext> | UnionTypeComposer<any, TContext> | ScalarTypeComposer<TContext>;
type ObjectTypeComposerArgumentConfig
type ObjectTypeComposerArgumentConfig = { type: ComposeInputType; defaultValue?: any; description?: string | null; deprecationReason?: string | null; astNode?: InputValueDefinitionNode | null; extensions?: Extensions; directives?: Directive[]; [key: string]: any;};
type ObjectTypeComposerArgumentConfigAsObjectDefinition
type ObjectTypeComposerArgumentConfigAsObjectDefinition = { type: ThunkWithSchemaComposer<ComposeInputTypeDefinition, SchemaComposer<any>>; defaultValue?: any; description?: string | null; deprecationReason?: string | null; extensions?: Extensions; directives?: Directive[]; [key: string]: any;};
type ObjectTypeComposerArgumentConfigDefinition
type ObjectTypeComposerArgumentConfigDefinition = | ObjectTypeComposerArgumentConfigAsObjectDefinition | ThunkWithSchemaComposer<ComposeInputTypeDefinition, SchemaComposer<any>>;
type ObjectTypeComposerArgumentConfigMap
type ObjectTypeComposerArgumentConfigMap<TArgs = Record<string, any>> = Record< keyof TArgs, ObjectTypeComposerArgumentConfig>;
type ObjectTypeComposerArgumentConfigMapDefinition
type ObjectTypeComposerArgumentConfigMapDefinition<TArgs = Record<string, any>> = Record<keyof TArgs, ObjectTypeComposerArgumentConfigDefinition>;
type ObjectTypeComposerAsObjectDefinition
type ObjectTypeComposerAsObjectDefinition<TSource, TContext> = { name: string; interfaces?: null | ThunkWithSchemaComposer< ReadonlyArray<InterfaceTypeComposerDefinition<any, TContext>>, SchemaComposer<TContext> >; fields?: ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext>; isTypeOf?: null | GraphQLIsTypeOfFn<TSource, TContext>; description?: string | null; isIntrospection?: boolean; extensions?: Extensions; directives?: Directive[];};
type ObjectTypeComposerDefinition
type ObjectTypeComposerDefinition<TSource, TContext> = | TypeAsString | TypeDefinitionString | ObjectTypeComposerAsObjectDefinition<TSource, TContext> | Readonly<ObjectTypeComposer<TSource, TContext>> | Readonly<GraphQLObjectType>;
type ObjectTypeComposerFieldConfig
type ObjectTypeComposerFieldConfig<TSource, TContext, TArgs = any> = { type: ComposeOutputType<TContext>; args?: ObjectTypeComposerArgumentConfigMap<TArgs>; resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>; subscribe?: GraphQLFieldResolver<TSource, TContext>; deprecationReason?: string | null; description?: string | null; astNode?: FieldDefinitionNode | null; extensions?: Extensions; directives?: Directive[]; [key: string]: any;};
type ObjectTypeComposerFieldConfigAsObjectDefinition
type ObjectTypeComposerFieldConfigAsObjectDefinition< TSource, TContext, TArgs = any> = { type: ThunkWithSchemaComposer< | ComposeOutputTypeDefinition<TContext> | Readonly<Resolver<any, TContext, any>>, SchemaComposer<TContext> >; args?: ObjectTypeComposerArgumentConfigMapDefinition<TArgs>; resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>; subscribe?: GraphQLFieldResolver<TSource, TContext>; deprecationReason?: string | null; description?: string | null; extensions?: Extensions | undefined; directives?: Directive[]; [key: string]: any;};
type ObjectTypeComposerFieldConfigDefinition
type ObjectTypeComposerFieldConfigDefinition<TSource, TContext, TArgs = any> = | ThunkWithSchemaComposer< ObjectTypeComposerFieldConfigAsObjectDefinition<TSource, TContext, TArgs>, SchemaComposer<TContext> > | ThunkWithSchemaComposer< ComposeOutputTypeDefinition<TContext>, SchemaComposer<TContext> >;
type ObjectTypeComposerFieldConfigMap
type ObjectTypeComposerFieldConfigMap<TSource, TContext> = ObjMap< ObjectTypeComposerFieldConfig<TSource, TContext>>;
type ObjectTypeComposerFieldConfigMapDefinition
type ObjectTypeComposerFieldConfigMapDefinition<TSource, TContext> = ObjMap< ObjectTypeComposerFieldConfigDefinition<TSource, TContext>>;
type ObjectTypeComposerGetRecordIdFn
type ObjectTypeComposerGetRecordIdFn<TSource, TContext, TArgs = any> = ( source: TSource, args?: TArgs, context?: TContext) => string;
type ObjectTypeComposerRelationArgsMapper
type ObjectTypeComposerRelationArgsMapper< TSource, TContext, TArgs extends Record<string, any> = Record<string, any>> = { [argName in keyof TArgs]: | { [key: string]: any; } | ObjectTypeComposerRelationArgsMapperFn<TSource, TContext, TArgs> | null | void | string | number | any[];};
type ObjectTypeComposerRelationArgsMapperFn
type ObjectTypeComposerRelationArgsMapperFn< TSource, TContext, TArgs = Record<string, any>> = ( source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo) => any;
type ObjectTypeComposerRelationMap
type ObjectTypeComposerRelationMap<TSource, TContext> = { [fieldName: string]: ObjectTypeComposerRelationOpts<any, TSource, TContext>;};
type ObjectTypeComposerRelationOpts
type ObjectTypeComposerRelationOpts< TRelationSource, TSource, TContext, TArgs extends Record<string, any> = any> = | ObjectTypeComposerRelationOptsWithResolver< TRelationSource, TSource, TContext, TArgs > | ObjectTypeComposerFieldConfigAsObjectDefinition<TSource, TContext, TArgs>;
type ObjectTypeComposerRelationOptsWithResolver
type ObjectTypeComposerRelationOptsWithResolver< TRelationSource, TSource, TContext, TArgs extends Record<string, any> = any> = { resolver: ThunkWithSchemaComposer< Resolver<TRelationSource, TContext, TArgs>, SchemaComposer<TContext> >; prepareArgs?: ObjectTypeComposerRelationArgsMapper<TSource, TContext, TArgs>; projection?: ProjectionType; description?: string | null; deprecationReason?: string | null; catchErrors?: boolean; extensions?: Extensions; directives?: Directive[];};
type ObjectTypeComposerThunked
type ObjectTypeComposerThunked<TReturn, TContext> = | ObjectTypeComposer<TReturn, TContext> | ThunkComposer<ObjectTypeComposer<TReturn, TContext>, GraphQLObjectType>;
type ObjMap
type ObjMap<T> = Record<string, T>;
type ObjMapReadOnly
type ObjMapReadOnly<T> = Readonly<Record<string, Readonly<T>>>;
type ProjectionNode
type ProjectionNode = { [fieldName: string]: any;};
type ProjectionType
type ProjectionType = { [fieldName: string]: any;};
type ResolverDebugOpts
type ResolverDebugOpts = { showHidden?: boolean; depth?: number; colors?: boolean;};
type ResolverDefinition
type ResolverDefinition<TSource, TContext, TArgs = any> = { type?: ThunkWithSchemaComposer< | Readonly<ComposeOutputType<TContext>> | ComposeOutputTypeDefinition<TContext> | Readonly<Resolver<any, TContext, any>>, SchemaComposer<TContext> >; resolve?: ResolverRpCb<TSource, TContext, TArgs>; args?: ObjectTypeComposerArgumentConfigMapDefinition<TArgs>; name?: string; displayName?: string; kind?: ResolverKinds; description?: string; deprecationReason?: string | null; projection?: ProjectionType; parent?: Resolver<any, TContext, any>; extensions?: Extensions; directives?: Directive[];};
type ResolverFilterArgConfigDefinition
type ResolverFilterArgConfigDefinition<TSource, TContext, TArgs = any> = { name: string; type: ComposeInputTypeDefinition; description?: string | null | void; query?: ResolverFilterArgFn<TSource, TContext, TArgs>; filterTypeNameFallback?: string; defaultValue?: any;};
type ResolverFilterArgFn
type ResolverFilterArgFn<TSource, TContext, TArgs = any> = ( query: any, value: any, resolveParams: ResolverResolveParams<TSource, TContext, TArgs>) => any;
type ResolverKinds
type ResolverKinds = 'query' | 'mutation' | 'subscription';
type ResolverMiddleware
type ResolverMiddleware<TSource, TContext, TArgs = any> = ( resolve: ( source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo ) => any, source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo) => any;
type ResolverNextRpCb
type ResolverNextRpCb<TSource, TContext, TArgs = any> = ( next: ResolverRpCb<TSource, TContext, TArgs>) => ResolverRpCb<TSource, TContext, TArgs>;
type ResolverResolveParams
type ResolverResolveParams<TSource, TContext, TArgs = any> = { source: TSource; args: TArgs; context: TContext; info: GraphQLResolveInfo; projection: Partial<ProjectionType>; [opt: string]: any;};
type ResolverRpCb
type ResolverRpCb<TSource, TContext, TArgs = any> = ( resolveParams: ResolverResolveParams<TSource, TContext, TArgs>) => Promise<any> | any;
type ResolverSortArgConfig
type ResolverSortArgConfig<TSource, TContext, TArgs = any> = { name: string; sortTypeNameFallback?: string; value: | { [key: string]: any; } | ResolverSortArgFn<TSource, TContext, TArgs> | string | number | boolean | any[]; deprecationReason?: string | null; description?: string | null;};
type ResolverSortArgFn
type ResolverSortArgFn<TSource, TContext, TArgs = any> = ( resolveParams: ResolverResolveParams<TSource, TContext, TArgs>) => any;
type ResolverWrapCb
type ResolverWrapCb< TNewSource, TPrevSource, TContext, TNewArgs = any, TPrevArgs = any> = ( newResolver: Resolver<TNewSource, TContext, TNewArgs>, prevResolver: Resolver<TPrevSource, TContext, TPrevArgs>) => Resolver<TNewSource, TContext, TNewArgs>;
type ScalarTypeComposerAsObjectDefinition
type ScalarTypeComposerAsObjectDefinition<TInternal, TExternal> = GraphQLScalarTypeConfig<TInternal, TExternal> & { extensions?: Extensions; directives?: Directive[]; };
type ScalarTypeComposerDefinition
type ScalarTypeComposerDefinition<TInternal, TExternal> = | TypeAsString | Readonly<ScalarTypeComposerAsObjectDefinition<TInternal, TExternal>> | Readonly<GraphQLScalarType>;
type SchemaComposerPrinterOptions
type SchemaComposerPrinterOptions = Options & SchemaFilterTypes;
type SchemaPrinterOptions
type SchemaPrinterOptions = Options;
type Thunk
type Thunk<T> = (() => any) | T;
type ThunkWithSchemaComposer
type ThunkWithSchemaComposer<T, SC> = ((schemaComposer: SC) => T) | T;
type TypeDefinitionString
type TypeDefinitionString = string;
type TypeNameString
type TypeNameString = string;
type TypeWrappedString
type TypeWrappedString = string;
type UnionTypeComposerAsObjectDefinition
type UnionTypeComposerAsObjectDefinition<TSource, TContext> = { name: string; types?: Thunk<ReadonlyArray<ObjectTypeComposerDefinition<any, TContext>> | null>; resolveType?: GraphQLTypeResolver<TSource, TContext> | null; description?: string | null; extensions?: Extensions; directives?: Directive[];};
type UnionTypeComposerDefinition
type UnionTypeComposerDefinition<TSource, TContext> = | TypeDefinitionString | TypeNameString | UnionTypeComposerAsObjectDefinition<TSource, TContext> | GraphQLUnionType;
type UnionTypeComposerResolverCheckFn
type UnionTypeComposerResolverCheckFn<TSource, TContext> = ( value: TSource, context: TContext, info: GraphQLResolveInfo) => MaybePromise<boolean | null | undefined>;
type UnionTypeComposerResolversMap
type UnionTypeComposerResolversMap<TSource, TContext> = Map< ObjectTypeComposerThunked<TSource, TContext>, UnionTypeComposerResolverCheckFn<TSource, TContext>>;
type UnionTypeComposerResolversMapDefinition
type UnionTypeComposerResolversMapDefinition<TSource, TContext> = | Map< | ObjectTypeComposerThunked<any, TContext> | ObjectTypeComposerDefinition<any, TContext>, UnionTypeComposerResolverCheckFn<TSource, TContext> > | Readonly<UnionTypeComposerResolversMap<TSource, TContext>>;
type UnionTypeComposerThunked
type UnionTypeComposerThunked<TReturn, TContext> = | UnionTypeComposer<TReturn, TContext> | ThunkComposer<UnionTypeComposer<TReturn, TContext>, GraphQLUnionType>;
Namespaces
namespace graphql
module 'lib/graphql.d.ts' {}
Package Files (32)
- lib/EnumTypeComposer.d.ts
- lib/InputTypeComposer.d.ts
- lib/InterfaceTypeComposer.d.ts
- lib/ListComposer.d.ts
- lib/NonNullComposer.d.ts
- lib/ObjectTypeComposer.d.ts
- lib/Resolver.d.ts
- lib/ScalarTypeComposer.d.ts
- lib/SchemaComposer.d.ts
- lib/ThunkComposer.d.ts
- lib/TypeMapper.d.ts
- lib/TypeStorage.d.ts
- lib/UnionTypeComposer.d.ts
- lib/graphql.d.ts
- lib/index.d.ts
- lib/type/buffer.d.ts
- lib/type/date.d.ts
- lib/type/index.d.ts
- lib/utils/createThunkedObjectProxy.d.ts
- lib/utils/dedent.d.ts
- lib/utils/deepmerge.d.ts
- lib/utils/definitions.d.ts
- lib/utils/filterByDotPaths.d.ts
- lib/utils/graphqlVersion.d.ts
- lib/utils/is.d.ts
- lib/utils/misc.d.ts
- lib/utils/pluralize.d.ts
- lib/utils/projection.d.ts
- lib/utils/schemaPrinter.d.ts
- lib/utils/toDottedObject.d.ts
- lib/utils/toInputType.d.ts
- lib/utils/typeHelpers.d.ts
Dependencies (1)
Dev Dependencies (18)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/graphql-compose
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/graphql-compose)
- HTML<a href="https://www.jsdocs.io/package/graphql-compose"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 12271 ms. - Missing or incorrect documentation? Open an issue for this package.