Skip to main content
class GraphQLInterfaceType
import { GraphQLInterfaceType } from "https://deno.land/x/kilatgraphql@16.6.0/mod.ts";

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 GraphQLInterfaceType({
  name: 'Entity',
  fields: {
    name: { type: GraphQLString }
  }
});

Constructors

new
GraphQLInterfaceType(config: Readonly<GraphQLInterfaceTypeConfig<any, any>>)

Properties

private
_fields
private
_interfaces
description: Maybe<string>
extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>
extensions: Readonly<GraphQLInterfaceTypeExtensions>
name: string
resolveType: Maybe<GraphQLTypeResolver<any, any>>
readonly
[Symbol.toStringTag]: string

Methods

toConfig(): GraphQLInterfaceTypeNormalizedConfig
toJSON(): string
toString(): string