From 2ef3b8bc05c110202af00f63ed922b7c719c8266 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Tue, 7 Jan 2025 13:49:56 +0000 Subject: [PATCH] Add status endpoint that does nothing but return 200 OK --- src/graphql.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graphql.rs b/src/graphql.rs index d3bd2d3..0fa9114 100644 --- a/src/graphql.rs +++ b/src/graphql.rs @@ -68,6 +68,9 @@ pub async fn serve_graphql(db: &Path, opts: ServeOptions) { .data(opts.policy.map(PolicyCheck::new)) .finish(); let app = Router::new() + // status check endpoint allows external processes to monitor status of server without + // making graphql queries + .route("/status", get(|| async {})) .route("/graphql", post(graphql_handler)) .route("/graphiql", get(graphiql)) .layer(Extension(schema));