Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function __construct(AbstractContainer $container, string $typeName, array $params) |
||
22 | { |
||
23 | assert($params[0] instanceof ObjectType); |
||
24 | $objectType = $params[0]; |
||
25 | |||
26 | $configuration = [ |
||
27 | 'name' => $typeName, |
||
28 | 'description' => 'Connection for ' . $typeName, |
||
29 | 'fields' => [ |
||
30 | 'edges' => Type::listOf($container |
||
31 | ->build(Node::class, $typeName . '_Node', $objectType)), |
||
32 | 'totalCount' => Type::nonNull(Type::int()), |
||
33 | 'pageInfo' => $container->get('PageInfo'), |
||
34 | ], |
||
35 | ]; |
||
36 | |||
37 | parent::__construct($configuration); |
||
38 | } |
||
40 |