Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UnionTypeApi

API for GraphQL UnionTypeDefinitionNode

Hierarchy

Index

Constructors

constructor

  • new UnionTypeApi(node: UnionTypeDefinitionNode): UnionTypeApi

Properties

Readonly _directives

_directives: Crud<DirectiveNode, DirectiveApi, string | { arguments?: ReadonlyArray<ArgumentNode | ArgumentNodeProps>; name: NameNodeProps | NameNode }, string> = new Crud({parent: this.node,key: 'directives',api: Api.directiveApi,factory: Ast.directiveNode,matcher: (node): Directivename => node.name.value,})

Readonly _types

_types: Crud<NamedTypeNode, NamedTypeApi, string | NameNode | { name: string }, string> = new Crud({parent: this.node,key: 'types',api: Api.namedTypeApi,factory: Ast.namedTypeNode,matcher: (node): Typename => node.name.value,})

Readonly node

node: UnionTypeDefinitionNode

Methods

assertEnumType

assertInputType

assertInterfaceType

assertKind

assertObjectType

assertScalarType

assertUnionType

createDirective

  • createDirective(props: Ast.DirectiveNodeProps | DirectiveNode): this
  • Parameters

    • props: Ast.DirectiveNodeProps | DirectiveNode

    Returns this

createType

  • createType(props: Ast.NamedTypeNodeProps | NamedTypeNode): this
  • Parameters

    • props: Ast.NamedTypeNodeProps | NamedTypeNode

    Returns this

getDescription

  • getDescription(): string | undefined

getDirective

getDirectiveNames

getDirectives

getName

  • getName(): string
  • Returns string

getType

getTypenames

getTypes

hasDescription

  • hasDescription(value?: undefined | string): boolean

hasDirective

hasTypename

  • hasTypename(typename: Typename): boolean

isEnumType

  • isEnumType(): this is EnumTypeApi

isInputType

  • isInputType(): this is InputTypeApi

isInterfaceType

  • isInterfaceType(): this is InterfaceTypeApi

isKind

  • isKind<K>(kind: K): this is KindToApiType<K>
  • Type parameters

    • K: GQL.KindEnum

    Parameters

    • kind: K

    Returns this is KindToApiType<K>

isObjectType

  • isObjectType(): this is ObjectTypeApi

isScalarType

  • isScalarType(): this is ScalarTypeApi

isUnionType

  • isUnionType(): this is UnionTypeApi

removeDirective

removeType

setDescription

  • setDescription(value: string | undefined): this

setName

  • setName(value: string): this
  • Parameters

    • value: string

    Returns this

updateDirective

  • updateDirective(directivename: Directivename, props: Ast.DirectiveNodeProps | Partial<Ast.DirectiveNodeProps | DirectiveNode>): this
  • Parameters

    • directivename: Directivename
    • props: Ast.DirectiveNodeProps | Partial<Ast.DirectiveNodeProps | DirectiveNode>

    Returns this

updateType

  • updateType(typename: Typename, props: Typename | Partial<Ast.NamedTypeNodeProps | NamedTypeNode>): this

upsertDirective

  • upsertDirective(props: Ast.DirectiveNodeProps | DirectiveNode): this
  • Parameters

    • props: Ast.DirectiveNodeProps | DirectiveNode

    Returns this

upsertType

  • upsertType(props: Ast.NamedTypeNodeProps | NamedTypeNode): this
  • Parameters

    • props: Ast.NamedTypeNodeProps | NamedTypeNode

    Returns this

Generated using TypeDoc