Skip to content

Getting error "expecting POST /_api/cursor" from Arangojs #800

@DougGarno55

Description

@DougGarno55

If I try to get records greater than 1,000, I get the "expecting POST /_api/cursor" error when I call the cursor.all() method in ArangoDB.js.

Here is my installation: ArangoDB version 3.11.3 ArangoDB.js versioin 8.6.0 Node.js version 18.14.0

If I add 'LIMIT 1000' to the query, everything works as expected. If I add 'LIMIT 1001' or anything over 1,000 I get the error.
My Test database has one collection (FOICU) with 5,000 documents and only one attribute (CU_NAME).

To replicate:

const Database = require( 'arangojs' ).Database;
let db = new Database({
   url: 'HTTP://127.0.0.1:8529',
   databaseName: 'TEST',
   auth: { username: 'root', password: 'test' }
});
let cursor = await db.query( 'FOR doc1 IN FOICU RETURN { "CU_NAME": doc1.CU_NAME }' );
let result = await cursor.all();
return result;

I've tried this on multiple databases, multiple collections all with the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions