Closed robross0606 closed 7 months ago
The problem is definitely on collection.ts
.
_edges(selector, options, direction) {
const { allowDirtyRead = undefined } = options;
return this._db.request({
path: `/_api/edges/${encodeURIComponent(this._name)}`,
allowDirtyRead,
qs: {
direction,
vertex: (0, documents_1._documentHandle)(selector, this._name, false),
},
});
}
edges(vertex, options) {
return this._edges(vertex, options);
}
inEdges(vertex, options) {
return this._edges(vertex, options, "in");
}
outEdges(vertex, options) {
return this._edges(vertex, options, "out");
}
None of these functions has a default for options
so it breaks _edges
because options
is undefined. You cannot destructure something from undefined
even if you have a default. This would break if options == undefined
:
const { allowDirtyRead = undefined } = options;
So this works:
await edgeCollection.outEdges('notLinks/test1', {})
But this doesn't:
await edgeCollection.outEdges('notLinks/test1')
Good catch. The argument should be optional given that none of the options are required.
edgeCollection.outEdges()
andedgeCollection.inEdges()
no longer appear to be functional after upgrading from 7.8.0 to 8.6.0. Making a call such asawait edgeCollection.outEdges('notLinks/test1')
results in this error stack:I've reviewed the migration guide and looked at the latest API documentation, but don't see anything listed that should impact this.