private static function doesFragmentConditionMatch(ExecutionContext $exeContext, $fragment, ObjectType $type)
{
$typeConditionNode = $fragment->typeCondition;
if (!$typeConditionNode) {
return true;
}
$conditionalType = Utils\TypeInfo::typeFromAST($exeContext->schema, $typeConditionNode);
if ($conditionalType === $type) {
return true;
}
if ($conditionalType instanceof AbstractType) {
return $exeContext->schema->isPossibleType($conditionalType, $type);
}
return false;
}