getPossibleTypes method
Get the possible ObjectTypeDefinitions that the given abstractType
could be resolved into
Implementation
List<ObjectTypeDefinition> getPossibleTypes(AbstractType? abstractType) {
if (abstractType is UnionTypeDefinition) {
return abstractType.types;
}
if (abstractType is InterfaceTypeDefinition) {
return objectTypes.where(abstractType.isImplementedBy).toList();
}
throw ArgumentError("$abstractType is unsupported");
}