use Overblog\GraphQLBundle\Definition\Builder\MappingInterface;
8
9
class RelayConnectionFieldsBuilder implements MappingInterface
10
{
11
public function toMappingDefinition(array $config): array
12
{
13
if (!isset($config['edgeType']) || !\is_string($config['edgeType'])) {
14
throw new \InvalidArgumentException('Using the Relay Connection fields builder, the key "edgeType" defining the GraphQL type of edges is required and must be a string.');
15
}
16
17
$edgeType = $config['edgeType'];
18
$edgeDescription = $config['edgeDescription'] ?? 'Edges of the connection';