Skip to content

Commit

Permalink
Fix/graphql (#1597)
Browse files Browse the repository at this point in the history
* fix graphql server start issue

* fmt
  • Loading branch information
shivam-880 committed May 13, 2024
1 parent 28c6a41 commit b4069a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions raphtory-graphql/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,28 @@ async fn server_termination(mut internal_signal: Receiver<()>) {
#[cfg(test)]
mod server_tests {
extern crate chrono;

use crate::server::RaphtoryServer;
use chrono::prelude::*;
use raphtory::prelude::{Graph, GraphViewOps};
use raphtory::{
core::Prop,
prelude::{AdditionOps, Graph, GraphViewOps},
};
use std::collections::HashMap;
use tokio::time::{sleep, Duration};

#[tokio::test]
async fn test_server_stop() {
let g = Graph::new().materialize().unwrap();
let graph = Graph::new();
graph
.add_node(
1,
1,
[("name", Prop::str("Character")), ("bool", Prop::Bool(true))],
None,
)
.unwrap();
let g = graph.materialize().unwrap();
let graphs = HashMap::from([("test".to_owned(), g)]);
let server = RaphtoryServer::from_map(graphs);
println!("calling start at time {}", Local::now());
Expand Down
2 changes: 1 addition & 1 deletion raphtory/src/search/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<'graph, G: GraphViewOps<'graph>> IndexedGraph<G> {
schema.add_f64_field(prop, INDEXED);
}
Prop::Bool(_) => {
schema.add_u64_field(prop, INDEXED);
schema.add_bool_field(prop, INDEXED);
}
_ => {
schema.add_text_field(prop, TEXT);
Expand Down

0 comments on commit b4069a5

Please sign in to comment.