Giter VIP home page Giter VIP logo

cayley.js's Issues

Tests seem to be failing for me

I'm not sure why

dascher-29223:cayley.js dascher1$ mocha


  cayley
    ✓ test All (44ms)
    ✓ test GetLimit
    1) test Vertex
    2) test V.In
    3) test V.Has
    4) test Morphism
    ✓ test Emit
    ✓ test type shape
    5) test write

  cayley
    ✓ test All
    ✓ test GetLimit
    6) test Vertex
    7) test V.In
    8) test V.Has
    9) test Morphism
    ✓ test Emit


  7 passing (15s)
  9 failing

  1) cayley test Vertex:
     Uncaught TypeError: Cannot read property 'length' of null
      at test/cayley.js:30:26
      at lib/v1/gremlin.js:133:9
      at Request._callback (lib/v1/gremlin.js:23:9)
      at Request.self.callback (node_modules/request/request.js:200:22)
      at Request.<anonymous> (node_modules/request/request.js:1041:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:968:12)
      at endReadableNT (_stream_readable.js:913:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  2) cayley test V.In:
     Uncaught TypeError: Cannot read property 'length' of null
      at test/cayley.js:38:26
      at lib/v1/gremlin.js:133:9
      at Request._callback (lib/v1/gremlin.js:23:9)
      at Request.self.callback (node_modules/request/request.js:200:22)
      at Request.<anonymous> (node_modules/request/request.js:1041:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:968:12)
      at endReadableNT (_stream_readable.js:913:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  3) cayley test V.Has:
     Uncaught TypeError: Cannot read property 'length' of null
      at test/cayley.js:46:26
      at lib/v1/gremlin.js:133:9
      at Request._callback (lib/v1/gremlin.js:23:9)
      at Request.self.callback (node_modules/request/request.js:200:22)
      at Request.<anonymous> (node_modules/request/request.js:1041:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:968:12)
      at endReadableNT (_stream_readable.js:913:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  4) cayley test Morphism:
     Uncaught TypeError: Cannot read property 'length' of null
      at test/cayley.js:55:20
      at lib/v1/gremlin.js:133:9
      at Request._callback (lib/v1/gremlin.js:23:9)
      at Request.self.callback (node_modules/request/request.js:200:22)
      at Request.<anonymous> (node_modules/request/request.js:1041:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:968:12)
      at endReadableNT (_stream_readable.js:913:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  5) cayley test write:
     Uncaught AssertionError: expected 'New Movie' to equal ''
      at test/cayley.js:97:20
      at lib/v1/gremlin.js:133:9
      at Request._callback (lib/v1/gremlin.js:23:9)
      at Request.self.callback (node_modules/request/request.js:200:22)
      at Request.<anonymous> (node_modules/request/request.js:1041:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:968:12)
      at endReadableNT (_stream_readable.js:913:12)
      at _combinedTickCallback (internal/process/next_tick.js:74:11)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  6) cayley test Vertex:
     TypeError: Cannot read property 'length' of null
      at test/thenable.js:29:26
      at _fulfilled (node_modules/q/q.js:834:54)
      at self.promiseDispatch.done (node_modules/q/q.js:863:30)
      at Promise.promise.promiseDispatch (node_modules/q/q.js:796:13)
      at node_modules/q/q.js:604:44
      at runSingle (node_modules/q/q.js:137:13)
      at flush (node_modules/q/q.js:125:13)
      at _combinedTickCallback (internal/process/next_tick.js:67:7)
      at process._tickCallback (internal/process/next_tick.js:98:9)

  7) cayley test V.In:
     Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.


  8) cayley test V.Has:
     Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.


  9) cayley test Morphism:
     Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.

How to have a cayley instance password protected?

How to have a cayley instance password protected?
Like in most db having a db account with a username and a password.
Is that done in a different layer, I mean in the perssitence layer that cayley depends on?
If so, how to connect it with this nodejs driver since this does not offer such options?

add promise style if no callback provided

  1. choose one promise for default
  2. allow user to use other promise libs
  3. using promise when Promise is available in global?
  4. only take care how to create a promise
  • rsvp.js
  • q
  • bluebird
  • avow
  • when

Basic querying doesn't seem to work

Using this test:

var log = require('winston');
var cayley = require('cayley');
var client = cayley("http://localhost:64210/", "v1");
var g = graph = client.graph;

client.write([{
  subject: 'subject',
  predicate: 'predicate',
  object: 'object'}
], function(err, body, res) {
  if (err) {
    log.info("error writing", err);
  } else {
    log.log('debug', 'Wrote');
  }
});

g.V('subject').Out('predicate').Tag('obj').All(function(err, result) {
  console.log("err", err);
  console.log("result", result);
})

I get null results in the last function, but the triple gets written to the database as visible using the HTTP user interface.

Maybe something in the latest cayley db broke this library?

Write triplet

I have configured cayley.js to use mongodb as backend. How do I go about writing/deleting a triplet through the client?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.