column, $field->getName().'Localized', $field->nullable); } /** * The description of the field. * * @return string */ public function description(): string { return "The formatted string value of the {$this->field->getName()} field"; } /** * The type returned by the field. * * @return Type */ protected function type(): Type { return Type::string(); } /** * Get the directives of the field. * * @return array */ public function directives(): array { return [ 'enumField' => [ 'localize' => true, ], ]; } /** * Resolve the field. * * @param mixed $root * @return mixed */ public function resolve(mixed $root): mixed { return Arr::get($root, $this->column)?->localize(); } }