GraphQLInterfaceType <TSource, TContext>
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Type parameters
- TSource = any
- TContext = any
Parameters
config: Readonly<GraphQLInterfaceTypeConfig<TSource, TContext>>
Returns GraphQLInterfaceType<TSource, TContext>
Properties
astNode
description
extensionASTNodes
extensions
name
resolveType
Accessors
[toStringTag]
Returns string
Methods
getFields
Returns GraphQLFieldMap<TSource, TContext>
getInterfaces
Returns readonly GraphQLInterfaceType<any, any>[]
toConfig
Returns GraphQLInterfaceTypeNormalizedConfig<TSource, TContext>
toJSON
Returns string
toString
Returns string
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: