arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
601 stars 107 forks source link

Getting error "expecting POST /_api/cursor" #803

Closed DougGarno55 closed 8 months ago

DougGarno55 commented 9 months ago

This is a re-opening of issue #800.

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 using the JavaScript driver Arangojs.

Here is my installation:

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.

Release 8.3.0 of arangojs works, the problem started with release 8.4.0.

pluma4345 commented 8 months ago

I've reopened #800 so I'm closing this as a duplicate.