Skip to content

Commit 9de7404

Browse files
committed
Fix #802
1 parent 352267f commit 9de7404

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ This driver uses semantic versioning:
1414
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
1515
changes that require changes in your code to upgrade.
1616

17+
## [Unreleased]
18+
19+
### Changed
20+
21+
- Made `options` argument in `collection.edges`, `inEdges` and `outEdges` optional ([#802](https://github.com/arangodb/arangojs/issues/802))
22+
1723
## [8.6.0] - 2023-10-24
1824

1925
### Added

src/collection.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,7 +3343,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
33433343
*/
33443344
edges(
33453345
selector: DocumentSelector,
3346-
options: CollectionEdgesOptions
3346+
options?: CollectionEdgesOptions
33473347
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;
33483348
/**
33493349
* Retrieves a list of all incoming edges of the document matching the given
@@ -3372,7 +3372,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
33723372
*/
33733373
inEdges(
33743374
selector: DocumentSelector,
3375-
options: CollectionEdgesOptions
3375+
options?: CollectionEdgesOptions
33763376
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;
33773377
/**
33783378
* Retrieves a list of all outgoing edges of the document matching the given
@@ -3401,7 +3401,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
34013401
*/
34023402
outEdges(
34033403
selector: DocumentSelector,
3404-
options: CollectionEdgesOptions
3404+
options?: CollectionEdgesOptions
34053405
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;
34063406

34073407
/**
@@ -3908,7 +3908,7 @@ export class Collection<T extends Record<string, any> = any>
39083908
//#region edges
39093909
protected _edges(
39103910
selector: DocumentSelector,
3911-
options: CollectionEdgesOptions,
3911+
options: CollectionEdgesOptions = {},
39123912
direction?: "in" | "out"
39133913
) {
39143914
const { allowDirtyRead = undefined } = options;
@@ -3922,15 +3922,15 @@ export class Collection<T extends Record<string, any> = any>
39223922
});
39233923
}
39243924

3925-
edges(vertex: DocumentSelector, options: CollectionEdgesOptions) {
3925+
edges(vertex: DocumentSelector, options?: CollectionEdgesOptions) {
39263926
return this._edges(vertex, options);
39273927
}
39283928

3929-
inEdges(vertex: DocumentSelector, options: CollectionEdgesOptions) {
3929+
inEdges(vertex: DocumentSelector, options?: CollectionEdgesOptions) {
39303930
return this._edges(vertex, options, "in");
39313931
}
39323932

3933-
outEdges(vertex: DocumentSelector, options: CollectionEdgesOptions) {
3933+
outEdges(vertex: DocumentSelector, options?: CollectionEdgesOptions) {
39343934
return this._edges(vertex, options, "out");
39353935
}
39363936

0 commit comments

Comments
 (0)