Automattic\WooCommerce\Vendor\GraphQL\Type
Schema::getPossibleTypes
Returns all possible concrete types for given abstract type (implementations for interfaces and members of union type for unions).
This operation requires full schema scan. Do not use in production environment.
Method of the class: Schema{}
No Hooks.
Returns
array<ObjectType>.
Usage
$Schema = new Schema(); $Schema->getPossibleTypes( $abstractType ): array;
- $abstractType(AbstractType&Type) (required)
- .
Schema::getPossibleTypes() Schema::getPossibleTypes code WC 11.1.2
public function getPossibleTypes(AbstractType $abstractType): array
{
if ($abstractType instanceof UnionType) {
return $abstractType->getTypes();
}
assert($abstractType instanceof InterfaceType, 'only other option');
return $this->getImplementations($abstractType)->objects();
}