private function getFragmentType(ValidationContext $context, $name) { $frag = $context->getFragment($name); return $frag ? TypeInfo::typeFromAST($context->getSchema(), $frag->typeCondition) : null; }