diff --git a/src/DependencyInjection/OverblogGraphQLExtension.php b/src/DependencyInjection/OverblogGraphQLExtension.php index 90a43ec8f..81c34bf08 100644 --- a/src/DependencyInjection/OverblogGraphQLExtension.php +++ b/src/DependencyInjection/OverblogGraphQLExtension.php @@ -262,6 +262,13 @@ private function setSchemaArguments(array $config, ContainerBuilder $container): [ $schemaName, \array_map(function ($id) { + if (!is_string($id)) { + throw new \InvalidArgumentException(sprintf( + 'Schema resolver maps must be string class references, got %s instead. Check your resolver config.', + gettype($id) + )); + } + return new Reference($id); }, $schemaConfig['resolver_maps']), ]