Aggregation
count
Override By overriding the count method, you can define how it should count the query:
public function resolveCountAggregate($root, $args, $context, $resolveInfo): int
{
// override calculation of the count
}
avg
Override By overriding the avg
method, you can define how it should average the query:
public function resolveAvgAggregate($root, $args, $context, $resolveInfo): array
{
// override calculation of the avg
}
sum
Override By overriding the sum
method, you can define how it should sum the query:
public function resolveSumAggregate($root, $args, $context, $resolveInfo): array
{
// override calculation of the sum
}
max
Override In your pepper class, add the following method. The return type must be an array.
public function resolveMaxAggregate($root, $args, $context, $resolveInfo): array
{
// override calculation of the max
}
min
Override In your pepper class, add the following method. The return type must be an array.
public function resolveMinAggregate($root, $args, $context, $resolveInfo): array
{
// override calculation of the min
}