Skip to content

Commit

Permalink
Get last updated for published books only
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Nov 15, 2024
1 parent 6c009f0 commit ba70a39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion thoth-client/assets/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion thoth-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit ba70a39

Please sign in to comment.