private static function resolveTypeFromClass(string $className, array $wantedTypes = null)
    {
        foreach (self::$classesMap as $gqlType => $config) {
            if ($config['class'] === $className) {
                if (!$wantedTypes || \in_array($config['type'], $wantedTypes)) {
                    return $gqlType;
                }
            }
        }

        return false;
    }