From ba70a3900e6845525cdb7106412963809cc81d45 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Fri, 15 Nov 2024 13:53:04 +0000 Subject: [PATCH] Get last updated for published books only --- thoth-client/assets/queries.graphql | 7 ++++++- thoth-client/src/lib.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/thoth-client/assets/queries.graphql b/thoth-client/assets/queries.graphql index 14da222f..878fcaa9 100644 --- a/thoth-client/assets/queries.graphql +++ b/thoth-client/assets/queries.graphql @@ -268,7 +268,12 @@ query WorkLastUpdatedQuery( query WorksLastUpdatedQuery( $publishers: [Uuid!] ) { - works(publishers: $publishers, limit: 1, order: {field: UPDATED_AT_WITH_RELATIONS, direction: DESC}) { + works( + publishers: $publishers, + workStatuses: [ACTIVE, WITHDRAWN, SUPERSEDED], + limit: 1, + order: {field: UPDATED_AT_WITH_RELATIONS, direction: DESC} + ) { updatedAtWithRelations } } diff --git a/thoth-client/src/lib.rs b/thoth-client/src/lib.rs index c6888624..e6d08de9 100644 --- a/thoth-client/src/lib.rs +++ b/thoth-client/src/lib.rs @@ -189,7 +189,7 @@ impl ThothClient { } } - /// Get the last `updated_at_with_relations` date of `Work`s in Thoth + /// Get the last `updated_at_with_relations` date of published `Work`s in Thoth /// /// # Errors ///