GraphQL\Type\Definition\NonNull::getWrappedType PHP Method

getWrappedType() public method

public getWrappedType ( boolean $recurse = false ) : mixed
$recurse boolean
return mixed
    public function getWrappedType($recurse = false)
    {
        $type = Type::resolve($this->ofType);
        Utils::invariant(!$type instanceof NonNull, 'Cannot nest NonNull inside NonNull');
        return $recurse && $type instanceof WrappingType ? $type->getWrappedType($recurse) : $type;
    }