<?php

declare (strict_types=1);
namespace PoP\Engine;

/** @internal */
class Environment
{
    public final const DISABLE_REDUNDANT_ROOT_TYPE_MUTATION_FIELDS = 'DISABLE_REDUNDANT_ROOT_TYPE_MUTATION_FIELDS';
    public final const ENABLE_QUERYING_APP_STATE_FIELDS = 'ENABLE_QUERYING_APP_STATE_FIELDS';
    public static function disablePersistingDefinitionsOnEachRequest() : bool
    {
        $envValue = \getenv('DISABLE_PERSISTING_DEFINITIONS_ON_EACH_REQUEST');
        return $envValue !== \false ? \strtolower($envValue) === "true" : \false;
    }
}
