Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

GraphQLInterfaceType

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 }
  }
});
class GraphQLInterfaceType {
constructor(config: Readonly<GraphQLInterfaceTypeConfig<any, any>>);
private _fields;
private _interfaces;
description: Maybe<string>;
extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;
extensions: Readonly<GraphQLInterfaceTypeExtensions>;
name: string;
resolveType: Maybe<GraphQLTypeResolver<any, any>>;
get [Symbol.toStringTag](): string;
 
getFields(): GraphQLFieldMap<any, any>;
getInterfaces(): ReadonlyArray<GraphQLInterfaceType>;
toConfig(): GraphQLInterfaceTypeNormalizedConfig;
toJSON(): string;
toString(): string;
}

§Constructors

§
new GraphQLInterfaceType(config: Readonly<GraphQLInterfaceTypeConfig<any, any>>)
[src]

§Properties

§
_fields
[src]
§
_interfaces
[src]
§
description: Maybe<string>
[src]
§
extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>
[src]
§
name: string
[src]
§
resolveType: Maybe<GraphQLTypeResolver<any, any>>
[src]
§
[Symbol.toStringTag]: string readonly
[src]

§Methods

§
getFields(): GraphQLFieldMap<any, any>
[src]
§
getInterfaces(): ReadonlyArray<GraphQLInterfaceType>
[src]
§
toConfig(): GraphQLInterfaceTypeNormalizedConfig
[src]
§
toJSON(): string
[src]
§
toString(): string
[src]