File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1135,14 +1135,18 @@ private function registerGraphQl(Application $app): void
11351135
11361136 $ app ->singleton ('api_platform.graphql.type_locator ' , function (Application $ app ) {
11371137 $ tagged = iterator_to_array ($ app ->tagged ('api_platform.graphql.type ' ));
1138+ $ services = [];
1139+ foreach ($ tagged as $ service ) {
1140+ $ services [$ service ->name ] = $ service ;
1141+ }
11381142
1139- return new ServiceLocator ($ tagged );
1143+ return new ServiceLocator ($ services );
11401144 });
11411145
11421146 $ app ->singleton (TypesFactoryInterface::class, function (Application $ app ) {
11431147 $ tagged = iterator_to_array ($ app ->tagged ('api_platform.graphql.type ' ));
11441148
1145- return new TypesFactory ($ app ->make ('api_platform.graphql.type_locator ' ), array_keys ($ tagged ));
1149+ return new TypesFactory ($ app ->make ('api_platform.graphql.type_locator ' ), array_column ($ tagged, ' name ' ));
11461150 });
11471151 $ app ->singleton (TypesContainerInterface::class, function () {
11481152 return new TypesContainer ();
You can’t perform that action at this time.
0 commit comments