Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/drash/src/services/graphql/graphql.ts>GraphQL.GraphQLInterfaceType

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
class GraphQL.GraphQLInterfaceType
import { GraphQL } from "https://deno.land/x/drash@v2.8.1/src/services/graphql/graphql.ts";
const { GraphQLInterfaceType } = GraphQL;

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

optional
astNode: Maybe<InterfaceTypeDefinitionNode>
description: Maybe<string>
extensionASTNodes: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>
extensions: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>
name: string
resolveType: Maybe<GraphQLTypeResolver<any, any>>

Methods

inspect(): string
toConfig(): GraphQLInterfaceTypeConfig<any, any> & { interfaces: Array<GraphQLInterfaceType>; fields: GraphQLFieldConfigMap<any, any>; extensions: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>; extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>; }
toJSON(): string
toString(): string