public function getVertexCollections($graph, array $options = [])
    {
        if ($graph instanceof Graph) {
            $graph = $graph->getKey();
        }

        $excludeOrphans = false;
        $_useCache      = $this->cacheEnabled;

        if ((bool) $options && isset($options['excludeOrphans']) && !is_bool($options['excludeOrphans'])) {
            $excludeOrphans = UrlHelper::getBoolString($options['excludeOrphans']);
        }

        if ($_useCache === true) {
            if ($excludeOrphans === true && !empty($this->cache[$graph]['excludeOrphans']['result'])) {
                return $this->cache[$graph]['excludeOrphans']['vertexCollections'];
            }

            if (!empty($this->cache[$graph]['vertexCollections'])) {
                return $this->cache[$graph]['vertexCollections'];
            }
        }
        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph, Urls::URLPART_VERTEX]);

        if ($excludeOrphans === true) {
            $url = UrlHelper::appendParamsUrl($url, ['excludeOrphans' => $excludeOrphans]);
        }

        $connection       = $this->getConnection();
        $batchCaptureMode = $connection->isInBatchCaptureMode();

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(false);
        }

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            throw new ClientException($e->getMessage());
        }

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(true);
        }

        $data = $response->getJson();
        $data = $data[self::OPTION_COLLECTIONS];

        sort($data);

        if ($_useCache === true) {
            if ($excludeOrphans === true && !empty($this->cache[$graph]['excludeOrphans']['vertexCollections'])) {
                $this->cache[$graph]['excludeOrphans']['vertexCollections'] = $data;
            } else {
                $this->cache[$graph]['vertexCollections'] = $data;
            }
        }

        return $data;
    }