Skip to content

Commit

Permalink
Fix #802
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma4345 committed Feb 14, 2024
1 parent 352267f commit 9de7404
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions src/collection.ts
Expand Up @@ -3343,7 +3343,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
*/
edges(
selector: DocumentSelector,
options: CollectionEdgesOptions
options?: CollectionEdgesOptions
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;
/**
* Retrieves a list of all incoming edges of the document matching the given
Expand Down Expand Up @@ -3372,7 +3372,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
*/
inEdges(
selector: DocumentSelector,
options: CollectionEdgesOptions
options?: CollectionEdgesOptions
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;
/**
* Retrieves a list of all outgoing edges of the document matching the given
Expand Down Expand Up @@ -3401,7 +3401,7 @@ export interface EdgeCollection<T extends Record<string, any> = any>
*/
outEdges(
selector: DocumentSelector,
options: CollectionEdgesOptions
options?: CollectionEdgesOptions
): Promise<ArangoApiResponse<CollectionEdgesResult<T>>>;

/**
Expand Down Expand Up @@ -3908,7 +3908,7 @@ export class Collection<T extends Record<string, any> = any>
//#region edges
protected _edges(
selector: DocumentSelector,
options: CollectionEdgesOptions,
options: CollectionEdgesOptions = {},
direction?: "in" | "out"
) {
const { allowDirtyRead = undefined } = options;
Expand All @@ -3922,15 +3922,15 @@ export class Collection<T extends Record<string, any> = 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");
}

Expand Down

0 comments on commit 9de7404

Please sign in to comment.