Skip to content

Commit 6b3d3e4

Browse files
authored
Merge pull request #53 from TomHAnderson/feature/performances
Added performances to root graphql
2 parents c6513b7 + 8ae19c4 commit 6b3d3e4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\GraphQL\Query\Performance;
6+
7+
use ApiSkeletons\Doctrine\ORM\GraphQL\Driver;
8+
use App\Doctrine\ORM\Entity\Performance;
9+
use App\GraphQL\Field;
10+
11+
class Connection implements Field
12+
{
13+
/**
14+
* @param mixed[] $variables
15+
*
16+
* @return mixed[]
17+
*/
18+
public static function getDefinition(
19+
Driver $driver,
20+
array $variables = [],
21+
string|null $operationName = null,
22+
): array {
23+
return $driver->completeConnection(Performance::class);
24+
}
25+
}

app/Http/Controllers/GraphQLController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function __invoke(EntityManager $entityManager, Request $request): array
5858
'fields' => [
5959
'artist' => Query\Artist\Entity::getDefinition($driver, $variables, $operationName),
6060
'artists' => Query\Artist\Connection::getDefinition($driver, $variables, $operationName),
61+
'performances' => Query\Performance\Connection::getDefinition($driver, $variables, $operationName),
6162
],
6263
]),
6364
'mutation' => new ObjectType([

0 commit comments

Comments
 (0)