Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Params in cypher query #9

Closed
electrichead opened this issue Jul 5, 2013 · 1 comment
Closed

Params in cypher query #9

electrichead opened this issue Jul 5, 2013 · 1 comment
Assignees

Comments

@electrichead
Copy link

I was trying to use params in a cypher query and discovered that cypherQuery doesn't actually send params at all. I've gotten around this via:

Neo4j.prototype.cypherQuery = function(query, params, callback){
var that = this;

// backward compatibility
if ((typeof(callback) == 'undefined') && (typeof(params) == 'function')) {
    callback = params;
    params = {};
}

request
    .post(that.url + '/db/data/cypher')
    .set('Content-Type', 'application/json')
    .send({
        query: query,
        params: params || {}
    })
@philippkueng
Copy link
Owner

Hi @electrichead and @withjam,

Not sure when this functionality was added, though I now added another unit test to make sure it's working with cypher query parameters.

Sorry guys for neglecting you.
Best, Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants