Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectTypeApi

API for GraphQL ObjectTypeDefinitionNode

Hierarchy

Index

Constructors

constructor

  • new ObjectTypeApi(node: ObjectTypeDefinitionNode): ObjectTypeApi

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 _fields

_fields: Crud<FieldDefinitionNode, FieldDefinitionApi, { arguments?: ReadonlyArray<InputValueDefinitionNodeProps | InputValueDefinitionNode>; description?: StringValueNodeProps | StringValueNode; directives?: ReadonlyArray<DirectiveNodeProps | DirectiveNode>; name: NameNodeProps | NameNode; type: TypeNodeProps | GQL.TypeNode }, string> = new Crud({parent: this.node,key: 'fields',api: Api.fieldDefinitionApi,factory: Ast.fieldDefinitionNode,matcher: (node): Fieldname => node.name.value,})

Readonly _interfaces

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

Readonly node

node: ObjectTypeDefinitionNode

Methods

assertEnumType

assertInputType

assertInterfaceType

assertKind

assertObjectType

assertScalarType

assertUnionType

createDirective

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

    • props: Ast.DirectiveNodeProps | DirectiveNode

    Returns this

createField

  • createField(props: Ast.FieldDefinitionNodeProps | FieldDefinitionNode): this
  • Parameters

    • props: Ast.FieldDefinitionNodeProps | FieldDefinitionNode

    Returns this

createInterface

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

    • props: Ast.NamedTypeNodeProps | NamedTypeNode

    Returns this

getDescription

  • getDescription(): string | undefined

getDirective

getDirectiveNames

getDirectives

getField

getFieldArguments

getFieldDirectives

getFieldType

getFieldTypename

getFieldnames

getFields

getFieldsByTypename

getInterface

getInterfaceNames

getInterfaces

getName

  • getName(): string
  • Returns string

hasDescription

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

hasDirective

hasField

hasInterface

  • hasInterface(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

removeField

removeInterface

  • removeInterface(typename: Typename): this

setDescription

  • setDescription(value: string | undefined): this

setFieldType

  • setFieldType(fieldname: Fieldname, props: Ast.TypeNodeProps | GQL.TypeNode): this

setFieldTypename

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

updateField

  • updateField(fieldname: Fieldname, props: Partial<Ast.FieldDefinitionNodeProps | FieldDefinitionNode>): this
  • Parameters

    • fieldname: Fieldname
    • props: Partial<Ast.FieldDefinitionNodeProps | FieldDefinitionNode>

    Returns this

updateInterface

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

upsertDirective

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

    • props: Ast.DirectiveNodeProps | DirectiveNode

    Returns this

upsertField

  • upsertField(props: Ast.FieldDefinitionNodeProps | FieldDefinitionNode): this
  • Parameters

    • props: Ast.FieldDefinitionNodeProps | FieldDefinitionNode

    Returns this

upsertInterface

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

    • props: Ast.NamedTypeNodeProps | NamedTypeNode

    Returns this

Generated using TypeDoc