Skip to content

outEdges() and inEdges() no longer works on 7.x #704

@robross0606

Description

@robross0606

It appears that outEdges() and inEdges() are incorrectly validating the collection against the passed in IDs on 7.x driver.

This Jest unit test fails:

  it('Gets in edges and out edges from Arango', async () => {
    const db = new Database({
      url: config.arangoDb.url,
      databaseName: config.arangoDb.database
    })
    const edgeCollection = await db.createEdgeCollection('links')
    const edgeCollectionData = await edgeCollection.get()
    expect(edgeCollectionData.type).toBe(CollectionType.EDGE_COLLECTION)
    
    await expect(edgeCollection.outEdges('notLinks/test1')).resolves.toBeEmptyArray()
    await expect(edgeCollection.inEdges('notLinks/test1')).resolves.toBeEmptyArray()
  })

The error message is:

Document ID "notLinks/test1" does not match collection name "links"

How are these functions, which are available only on EdgeCollection types, supposed to work now? The entire semantics of the functions rely on the document IDs not matching the edge collection name.

I suspect this is a regression caused by http://arangodb.github.io/arangojs/MIGRATING#cross-collection-operations.

Metadata

Metadata

Assignees

Labels

BugA code defect that needs to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions