Skip to content

Commit

Permalink
added start and end
Browse files Browse the repository at this point in the history
  • Loading branch information
rachchan committed Oct 16, 2023
1 parent 58ed984 commit 20bb2c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 9 additions & 1 deletion raphtory-graphql/src/model/graph/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use raphtory::{
},
graph::edge::EdgeView,
},
prelude::LayerOps,
prelude::{LayerOps, TimeOps},
};

#[derive(ResolvedObject)]
Expand Down Expand Up @@ -38,6 +38,14 @@ impl Edge {
self.ee.latest_time()
}

async fn start(&self) -> Option<i64> {
self.ee.start()
}

async fn end(&self) -> Option<i64> {
self.ee.end()
}

async fn src(&self) -> Node {
self.ee.src().into()
}
Expand Down
8 changes: 8 additions & 0 deletions raphtory-graphql/src/model/graph/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ impl Node {
self.vv.name()
}

async fn start(&self) -> Option<i64> {
self.vv.start()
}

async fn end(&self) -> Option<i64> {
self.vv.end()
}

pub async fn node_type(&self) -> String {
self.vv
.properties()
Expand Down

0 comments on commit 20bb2c8

Please sign in to comment.