1313
1414namespace ApiPlatform \Core \GraphQl \Action ;
1515
16+ use ApiPlatform \Core \GraphQl \Exception \ExceptionFormatterFactory ;
17+ use ApiPlatform \Core \GraphQl \Exception \ExceptionFormatterInterface ;
1618use ApiPlatform \Core \GraphQl \ExecutorInterface ;
1719use ApiPlatform \Core \GraphQl \Type \SchemaBuilderInterface ;
1820use GraphQL \Error \Debug ;
1921use GraphQL \Error \Error ;
2022use GraphQL \Error \UserError ;
23+ use GraphQL \Error \FormattedError ;
2124use GraphQL \Executor \ExecutionResult ;
2225use Symfony \Component \HttpFoundation \JsonResponse ;
2326use Symfony \Component \HttpFoundation \Request ;
@@ -39,8 +42,9 @@ final class EntrypointAction
3942 private $ graphiqlEnabled ;
4043 private $ graphQlPlaygroundEnabled ;
4144 private $ defaultIde ;
45+ private $ exceptionFormatterFactory ;
4246
43- public function __construct (SchemaBuilderInterface $ schemaBuilder , ExecutorInterface $ executor , GraphiQlAction $ graphiQlAction , GraphQlPlaygroundAction $ graphQlPlaygroundAction , bool $ debug = false , bool $ graphiqlEnabled = false , bool $ graphQlPlaygroundEnabled = false , $ defaultIde = false )
47+ public function __construct (SchemaBuilderInterface $ schemaBuilder , ExecutorInterface $ executor , GraphiQlAction $ graphiQlAction , GraphQlPlaygroundAction $ graphQlPlaygroundAction , ExceptionFormatterFactory $ exceptionFormatterFactory , bool $ debug = false , bool $ graphiqlEnabled = false , bool $ graphQlPlaygroundEnabled = false , $ defaultIde = false )
4448 {
4549 $ this ->schemaBuilder = $ schemaBuilder ;
4650 $ this ->executor = $ executor ;
@@ -50,6 +54,7 @@ public function __construct(SchemaBuilderInterface $schemaBuilder, ExecutorInter
5054 $ this ->graphiqlEnabled = $ graphiqlEnabled ;
5155 $ this ->graphQlPlaygroundEnabled = $ graphQlPlaygroundEnabled ;
5256 $ this ->defaultIde = $ defaultIde ;
57+ $ this ->exceptionFormatterFactory = $ exceptionFormatterFactory ;
5358 }
5459
5560 public function __invoke (Request $ request ): Response
0 commit comments