File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/Metadata/Resource/Factory Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 14
14
namespace ApiPlatform \Metadata \Resource \Factory ;
15
15
16
16
use ApiPlatform \Metadata \ApiResource ;
17
- use ApiPlatform \Metadata \CollectionOperationInterface ;
18
- use ApiPlatform \Metadata \GraphQl \Operation as GraphQlOperation ;
17
+ use ApiPlatform \Metadata \Get ;
19
18
use ApiPlatform \Metadata \HttpOperation ;
20
19
use ApiPlatform \Metadata \NotExposed ;
21
- use ApiPlatform \Metadata \Operations ;
22
20
use ApiPlatform \Metadata \Resource \ResourceMetadataCollection ;
23
21
use ApiPlatform \Symfony \Routing \SkolemIriConverter ;
24
22
@@ -59,13 +57,10 @@ public function create(string $resourceClass): ResourceMetadataCollection
59
57
$ operations = $ resource ->getOperations ();
60
58
61
59
foreach ($ operations as $ operation ) {
62
- // Ignore collection and GraphQL operations
63
- if ($ operation instanceof CollectionOperationInterface || $ operation instanceof GraphQlOperation) {
64
- continue ;
65
- }
66
-
67
60
// An item operation has been found, nothing to do anymore in this factory
68
- return $ resourceMetadataCollection ;
61
+ if ($ operation instanceof Get) {
62
+ return $ resourceMetadataCollection ;
63
+ }
69
64
}
70
65
}
71
66
You can’t perform that action at this time.
0 commit comments