import { GraphQLInterfaceType } from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/type/index.d.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
resolveType: Maybe<GraphQLTypeResolver<any, any>>
Methods
getFields(): GraphQLFieldMap<any, any>
getInterfaces(): Array<GraphQLInterfaceType>
inspect(): string
toConfig(): GraphQLInterfaceTypeConfig<any, any> & { interfaces: Array<GraphQLInterfaceType>; fields: GraphQLFieldConfigMap<any, any>; extensions: Maybe<Readonly<Record<string, any>>>; extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>; }
toJSON(): string
toString(): string