Class CommonCodeGenerator
Constructors
Methods
addTypeMapImports
- addTypeMapImports(importCodeGenerator): void
Returns void
addTypeMapping
- addTypeMapping(typeMapping): void
Returns void
firstToUpper
- firstToUpper(name): string
Returns string
generateComment
- generateComment(text): string
Returns string
generateDescription
- generateDescription(node): string
Parameters
- node: GraphQLNamedType | GraphQLEnumValue
Returns string
generateDirectiveInterface
- generateDirectiveInterface(node): string
Returns string
generateDirectiveInterfaceName
- generateDirectiveInterfaceName(node): string
Returns string
generateDirectives
- generateDirectives(): string
Returns string
generateDirectivesMap
- generateDirectivesMap(): string
Returns string
generateDirectivesMapEntry
- generateDirectivesMapEntry(node): string
Returns string
generateDirectivesMapValue
- generateDirectivesMapValue(node): {}
Returns {}
generateEnum
- generateEnum(node): string
Returns string
generateEnumValue
- generateEnumValue(node): string
Returns string
generateFieldDescription
- generateFieldDescription(node): string
Parameters
- node: GraphQLInputField | GraphQLField<unknown, unknown, any>
Returns string
generateHeader
- generateHeader(): string
Returns string
generateHelpers
- generateHelpers(): string
Returns string
generateInputField
- generateInputField(node): string
Returns string
generateInputObject
- generateInputObject(node): string
Parameters
- node: GraphQLInputObjectType
Returns string
generateInputRef
- generateInputRef(node, optional?): string
Parameters
- node: GraphQLInputType
- optional: boolean = true
Returns string
generateMaybe
- generateMaybe(typeRef, optional): string
Parameters
- typeRef: string
- optional: boolean
Returns string
generateNamedInputRef
- generateNamedInputRef(node): string
Parameters
- node: GraphQLEnumType | GraphQLInputObjectType | GraphQLScalarType<unknown, unknown>
Returns string
generateNamedOutputRef
- generateNamedOutputRef(node): string
Returns string
generateOutputRef
- generateOutputRef(node, optional?): string
Parameters
- node: GraphQLOutputType
- optional: boolean = true
Returns string
generateTypeForDescription
- generateTypeForDescription(node): string
Returns string
join
- join(parts, separator?, braces?): string
Parameters
- parts: (undefined | string)[]
- separator: string = '\n\n'
Optional
braces: string
Returns string
mapStandardScalars
- mapStandardScalars(): void
Returns void
mapUnknownScalars
- mapUnknownScalars(): void
Returns void