Skip to content

Commit 7c3d350

Browse files
committed
Fixing mutation support for AggregateControllerQueryProvider
1 parent 7b307a6 commit 7c3d350

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/AggregateControllerQueryProvider.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,20 @@ public function getQueries(): array
7575

7676
return $queryList;
7777
}
78+
79+
/**
80+
* @return Field[]
81+
*/
82+
public function getMutations(): array
83+
{
84+
$mutationList = [];
85+
86+
foreach ($this->controllers as $controllerName) {
87+
$controller = $this->container->get($controllerName);
88+
$queryProvider = new ControllerQueryProvider($controller, $this->annotationReader, $this->typeMapper, $this->hydrator);
89+
$mutationList = array_merge($mutationList, $queryProvider->getMutations());
90+
}
91+
92+
return $mutationList;
93+
}
7894
}

src/QueryProviderInterface.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ interface QueryProviderInterface
1414
* @return Field[]
1515
*/
1616
public function getQueries(): array;
17+
18+
/**
19+
* @return Field[]
20+
*/
21+
public function getMutations(): array;
1722
}

0 commit comments

Comments
 (0)