/**
* NonNullType constructor.
*
* @param AbstractType|string $fieldType
*
* @throws ConfigurationException
*/
public function __construct($fieldType)
{
if (!TypeService::isGraphQLType($fieldType)) {
throw new ConfigurationException('NonNullType accepts only GraphpQL Types as argument');
}
if (TypeService::isScalarType($fieldType)) {
$fieldType = TypeFactory::getScalarType($fieldType);
}
$this->_typeOf = $fieldType;
}