File tree 1 file changed +6
-2
lines changed
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
1135
1135
1136
1136
$ app ->singleton ('api_platform.graphql.type_locator ' , function (Application $ app ) {
1137
1137
$ tagged = iterator_to_array ($ app ->tagged ('api_platform.graphql.type ' ));
1138
+ $ services = [];
1139
+ foreach ($ tagged as $ service ) {
1140
+ $ services [$ service ->name ] = $ service ;
1141
+ }
1138
1142
1139
- return new ServiceLocator ($ tagged );
1143
+ return new ServiceLocator ($ services );
1140
1144
});
1141
1145
1142
1146
$ app ->singleton (TypesFactoryInterface::class, function (Application $ app ) {
1143
1147
$ tagged = iterator_to_array ($ app ->tagged ('api_platform.graphql.type ' ));
1144
1148
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 ' ));
1146
1150
});
1147
1151
$ app ->singleton (TypesContainerInterface::class, function () {
1148
1152
return new TypesContainer ();
You can’t perform that action at this time.
0 commit comments