Class ServerCodeGenerator
Constructors
Methods
firstToUpper
- firstToUpper(name): string
Returns string
generateArgs
- generateArgs(field, object): undefined | string
Parameters
- field: GraphQLField<unknown, unknown, any>
- object: GraphQLInterfaceType | GraphQLObjectType<any, any>
Returns undefined | string
generateArgsForType
- generateArgsForType(node): undefined | string
Returns undefined | string
generateArgsForTypes
- generateArgsForTypes(): string
Returns string
generateArgsName
- generateArgsName(field, object): string
Parameters
- field: GraphQLField<unknown, unknown, any>
- object: GraphQLInterfaceType | GraphQLObjectType<any, any>
Returns string
generateArgsRef
- generateArgsRef(field, object): string
Parameters
- field: GraphQLField<unknown, unknown, any>
- object: GraphQLInterfaceType | GraphQLObjectType<any, any>
Returns string
generateDirectives
- generateDirectives(): string
Returns string
generateEnumResolver
- generateEnumResolver(node): string
Returns string
generateEnumResolvers
- generateEnumResolvers(): string
Returns string
generateEnumValueResolver
- generateEnumValueResolver(node, parent): string
Parameters
- node: GraphQLEnumValue
- parent: GraphQLEnumType
Returns string
generateField
- generateField(field): string
Parameters
- field: GraphQLField<unknown, unknown, any>
Returns string
generateFieldResolver
- generateFieldResolver(field, parent): string
Parameters
- field: GraphQLField<unknown, unknown, any>
- parent: GraphQLInterfaceType | GraphQLObjectType<any, any>
Returns string
generateHeader
- generateHeader(): string
Returns string
generateHelpers
- generateHelpers(): string
Returns string
generateImports
- generateImports(): string
Returns string
generateInputType
- generateInputType(node): undefined | string
Returns undefined | string
generateInputTypes
- generateInputTypes(): string
Returns string
generateInterfaceResolver
- generateInterfaceResolver(node): string
Parameters
- node: GraphQLInterfaceType
Returns string
generateIsTypeOf
- generateIsTypeOf(node): string
Parameters
- node: GraphQLObjectType<any, any>
Returns string
generateObjectResolver
- generateObjectResolver(node): string
Parameters
- node: GraphQLObjectType<any, any>
Returns string
generateResolveType
- generateResolveType(node): string
Parameters
- node: GraphQLInterfaceType | GraphQLUnionType
Returns string
generateResolver
- generateResolver(node): undefined | string
Returns undefined | string
generateResolverMap
- generateResolverMap(): string
Returns string
generateResolverMapEntry
- generateResolverMapEntry(node): string
Returns string
generateResolverMapEntryType
- generateResolverMapEntryType(node): undefined | string
Returns undefined | string
generateResolvers
- generateResolvers(): string
Returns string
generateServer
- generateServer(): string
Returns string
generateSubscriptionFieldResolver
- generateSubscriptionFieldResolver(field, parent): string
Parameters
- field: GraphQLField<unknown, unknown, any>
- parent: GraphQLObjectType<any, any>
Returns string
generateSubscriptionResolver
- generateSubscriptionResolver(node): string
Parameters
- node: GraphQLObjectType<any, any>
Returns string
generateType
- generateType(node): undefined | string
Returns undefined | string
generateTypes
- generateTypes(): string
Returns string
generateUnion
- generateUnion(node): string
Returns string
generateUnionResolver
- generateUnionResolver(node): string
Returns string
join
- join(parts, separator?, braces?): string
Parameters
- parts: (undefined | string)[]
- separator: string = '\n\n'
Optional
braces: string
Returns string
mapTypes
- mapTypes(): void
Returns void