-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
using an env variable to disable/enable introspection is not woking as should be
overblog_graphql:
security:
query_max_depth: 20
enable_introspection: '%env(bool:GRAPHQL_ENABLE_INTROSPECTION)%'the issue is related to the set setSecurity method in the OverblogGraphqlExtension.
private function setSecurity(array $config, ContainerBuilder $container): void
{
$executorDefinition = $container->getDefinition(Executor::class);
if ($config['security']['enable_introspection']) {
$executorDefinition->addMethodCall('enableIntrospectionQuery');
} else {
$executorDefinition->addMethodCall('disableIntrospectionQuery');
}
foreach ($config['security'] as $key => $value) {
$container->setParameter(sprintf('%s.%s', $this->getAlias(), $key), $value);
}
}at compile time the $config['security']['enable_introspection'] is a placeholder like
env_53efa566b94c30e2_bool_GRAPHQL_ENABLE_INTROSPECTION_7b26115e46b824a8dd0e86467640739b
which will always evaluates to true
Metadata
Metadata
Assignees
Labels
No labels