protected function resolveType($object, MappingContext $context): string
    {
        $definition = $context->getDefinition();

        if ($definition->hasType()) {
            return $definition->getType();
        }

        return $this->typeHandler->getType($object, $context);
    }