From b9cfbbb420a66296c42fd863fe0bd0fa6f7445c1 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 30 Aug 2024 19:26:19 +0200 Subject: Add filter for alert by id --- src/graphql/query.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/graphql/query.rs') diff --git a/src/graphql/query.rs b/src/graphql/query.rs index 36883e7..0bc5682 100644 --- a/src/graphql/query.rs +++ b/src/graphql/query.rs @@ -48,9 +48,10 @@ impl Query { async fn alerts<'ctx>( &self, ctx: &Context<'ctx>, + #[graphql(desc = "Filter by ID")] id: Option, #[graphql(desc = "Limit results")] limit: Option, #[graphql(desc = "Offset results")] offset: Option, ) -> Result>, String> { - alert::get_alerts(ctx, limit, offset).await + alert::get_alerts(ctx, id, limit, offset).await } } -- cgit v1.2.3-18-g5258