, \Nuwave\Lighthouse\Support\Contracts\GraphQLContext, \Nuwave\Lighthouse\Execution\ResolveInfo): mixed */ public function resolveField(FieldValue $fieldValue): callable { return function (Model|array $root, array $args) use ($fieldValue) { $format = Arr::string($args, 'format'); /** @var Carbon|null $field */ $field = $root instanceof Model ? $root->getAttribute($this->directiveArgValue('attribute') ?? $fieldValue->getFieldName()) : $root[$fieldValue->getFieldName()]; return $field?->format($format); }; } }