Skip to content

Commit

Permalink
Change return signature to be ArangoCursor<T>.
Browse files Browse the repository at this point in the history
ArangoCursor does not automatically retrieve Document objects.
  • Loading branch information
envis10n committed Mar 23, 2022
1 parent 6f342fc commit c51ef46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Graph {
startVertex: string,
direction: "OUTBOUND" | "INBOUND" | "ANY",
options?: GraphTraversalOptions<T>,
): ArangoCursor<Document<T>> {
): ArangoCursor<T> {
if (options == undefined) options = {};
let query = "FOR vertex IN";
if (options.limit != undefined) {
Expand Down Expand Up @@ -94,7 +94,7 @@ export class Graph {
startVertex: string,
endVertex: string,
direction: "OUTBOUND" | "INBOUND" | "ANY",
): ArangoCursor<Document<T>> {
): ArangoCursor<T> {
const query =
`FOR vertex IN ${direction} SHORTEST_PATH '${startVertex}' TO '${endVertex}' GRAPH '${this.name}'\n\tRETURN vertex`;
return new ArangoCursor(this.ax, query);
Expand Down

0 comments on commit c51ef46

Please sign in to comment.