/**
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(Request $request)
 {
     try {
         $page = $request->input('page', 1);
         $skip = (int) ($this->itemsPerPage * ($page - 1));
         $limit = $this->itemsPerPage;
         $connection = Connection::getConnection();
         $result = $connection->send('g.V()');
         //$result = $connection->send('g.V().[0..2]');
         //g.addVertex(null,[name:"stephen"])
         //$teste = $db->send('g.addV(T.label, "user", "name","Lacerda", "idUser", "2")');
         //$originalCount = $db->send('g.V().count()');
         //$teste = $db->send('g.addV("label", "user", "name","Rodrigo", "idUser", "1")');
         $connection->close();
         print_r($result);
         die('--');
         $paginator = $this->repository->findAllPaginate($request);
         return $this->response->paginator($paginator, new EmailTransformer());
     } catch (QueryParserException $e) {
         throw new StoreResourceFailedException($e->getMessage(), $e->getFields());
     }
 }
 public function __construct()
 {
     $this->connection = Connection::getConnection();
     $this->type = $this->handleType($this->getType());
 }