protected function getEffectiveType(
        TypeInterface $variableType,
        VariableDefinitionNode $variableDefinition
    ): TypeInterface {
        return (!$variableDefinition->hasDefaultValue() || $variableType instanceof NonNullType)
            ? $variableType
            : newNonNull($variableType);
    }
protected function getEffectiveType(
        TypeInterface $variableType,
        VariableDefinitionNode $variableDefinition
    ): TypeInterface {
        return (!$variableDefinition->hasDefaultValue() || $variableType instanceof NonNullType)
            ? $variableType
            : newNonNull($variableType);
    }
protected function getEffectiveType ( TypeInterface $ variableType , VariableDefinitionNode $ variableDefinition ) : TypeInterface { return ( ! $ variableDefinition -> hasDefaultValue ( ) || $ variableType instanceof NonNullType ) ? $ variableType : newNonNull ( $ variableType ) ; }
If a variable definition has a default value, it's effectively non-null.

@param TypeInterface          $variableType
@param VariableDefinitionNode $variableDefinition
@return TypeInterface

@throws InvariantException
If a variable definition has a default value it s effectively non - null .