diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b28c836..a3f86e94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,12 @@ This driver uses semantic versioning: - A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_ changes that require changes in your code to upgrade. +## [Unreleased] + +### Changed + +- Made `options` argument in `collection.edges`, `inEdges` and `outEdges` optional ([#802](https://github.com/arangodb/arangojs/issues/802)) + ## [8.6.0] - 2023-10-24 ### Added diff --git a/src/collection.ts b/src/collection.ts index b587e360..3027d510 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -3343,7 +3343,7 @@ export interface EdgeCollection = any> */ edges( selector: DocumentSelector, - options: CollectionEdgesOptions + options?: CollectionEdgesOptions ): Promise>>; /** * Retrieves a list of all incoming edges of the document matching the given @@ -3372,7 +3372,7 @@ export interface EdgeCollection = any> */ inEdges( selector: DocumentSelector, - options: CollectionEdgesOptions + options?: CollectionEdgesOptions ): Promise>>; /** * Retrieves a list of all outgoing edges of the document matching the given @@ -3401,7 +3401,7 @@ export interface EdgeCollection = any> */ outEdges( selector: DocumentSelector, - options: CollectionEdgesOptions + options?: CollectionEdgesOptions ): Promise>>; /** @@ -3908,7 +3908,7 @@ export class Collection = any> //#region edges protected _edges( selector: DocumentSelector, - options: CollectionEdgesOptions, + options: CollectionEdgesOptions = {}, direction?: "in" | "out" ) { const { allowDirtyRead = undefined } = options; @@ -3922,15 +3922,15 @@ export class Collection = any> }); } - edges(vertex: DocumentSelector, options: CollectionEdgesOptions) { + edges(vertex: DocumentSelector, options?: CollectionEdgesOptions) { return this._edges(vertex, options); } - inEdges(vertex: DocumentSelector, options: CollectionEdgesOptions) { + inEdges(vertex: DocumentSelector, options?: CollectionEdgesOptions) { return this._edges(vertex, options, "in"); } - outEdges(vertex: DocumentSelector, options: CollectionEdgesOptions) { + outEdges(vertex: DocumentSelector, options?: CollectionEdgesOptions) { return this._edges(vertex, options, "out"); }