Skip to main content

GraphQLInterfaceTypeImpl

Interface Type Definition

When a field can return one of a heterogeneous set of types, a Interface type is used to describe what types are possible, what fields are in common across all types, as well as a function to determine which type is actually used when the field is resolved.

Example:

const EntityType = new GraphQLInterfaceTypeImpl({
name: 'Entity',
fields: {
name: { type: GraphQLString }
}
});

Hierarchy

  • GraphQLEntityImpl
    • GraphQLInterfaceTypeImpl

Implements

  • GraphQLInterfaceType

Index

Constructors

constructor

Properties

readonly[GRAPHQL_INTERFACE_TYPE_SYMBOL]

[GRAPHQL_INTERFACE_TYPE_SYMBOL]: true = true

readonly[GRAPHQL_VERSION_SYMBOL]

[GRAPHQL_VERSION_SYMBOL]: undefined = undefined

astNode

description

description: Maybe<string>

extensionASTNodes

extensionASTNodes: readonly InterfaceTypeExtensionNode[]

extensions

extensions: Readonly<GraphQLInterfaceTypeExtensions>

name

name: string

resolveType

resolveType: Maybe<GraphQLTypeResolver<any, any>>

Accessors

[toStringTag]

  • get [toStringTag](): string
  • Returns string

Methods

getFields

  • Returns GraphQLFieldMap<any, any>

getInterfaces

  • getInterfaces(): readonly GraphQLInterfaceType[]
  • Returns readonly GraphQLInterfaceType[]

toConfig

  • toConfig(): GraphQLInterfaceTypeNormalizedConfig
  • Returns GraphQLInterfaceTypeNormalizedConfig

toJSON

  • toJSON(): string
  • Returns string

toString

  • toString(): string
  • Returns string