FunctionsdefaultTypeResolverdefaultTypeResolver CallabledefaultTypeResolver(value: unknown, context: unknown, info: GraphQLResolveInfo, abstractType: GraphQLAbstractType): PromiseOrValue<undefined | string>If a resolveType function is not given, then a default resolve behavior is used which attempts two strategies:First, See if the provided value has a __typename field defined, if so, use that value as name of the resolved type. Otherwise, test each possible type for the abstract type by calling isTypeOf for the object being coerced, returning the first type that matches.Parametersvalue: unknowncontext: unknowninfo: GraphQLResolveInfoabstractType: GraphQLAbstractTypeReturns PromiseOrValue<undefined | string>
If a resolveType function is not given, then a default resolve behavior is used which attempts two strategies:
First, See if the provided value has a
__typename
field defined, if so, use that value as name of the resolved type.Otherwise, test each possible type for the abstract type by calling isTypeOf for the object being coerced, returning the first type that matches.