-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support filtering works by multiple work_statuses
and by updated_at_with_relations
#484
Conversation
…rors arising from CRUD change)
…ure as work statuses)
…mplete, compiler errors)
…er (compiler errors)
…ne by default (compiler errors)
…nused in all cases)
…be constructed as well as retrieved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, rather than TimeExpression
I'm more inclined to support filtering by field more widely. Something like:
pub enum Operator {
Eq,
Neq,
Gt,
Lt,
Gte,
Lte,
Ilike,
}
pub struct WorkFilter {
pub field: WorkField,
pub operator: Operator,
pub value: String,
}
fn works (
[...]
filters: Vec<WorkFilter>,
[...]
)
@@ -130,7 +139,13 @@ impl QueryRoot { | |||
default = vec![], | |||
description = "Specific types to filter by", | |||
), | |||
work_status(description = "A specific status to filter by"), | |||
work_statuses( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of replacing the current argument, keep both for the time being to avoid breaking dependants. The current GraphQL specification doesn't allow marking arguments as deprecated (though it will in the next release), so we'll just need to rely on using the description as the deprecation notice
As discussed, due to other priorities, we'll keep the basic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also keep language_relation
and flag it as deprecated like work_status
I'm just thinking that it'd also be good to update |
Required for automatic dissemination (initially to Crossref), where we need to find works which are either
ACTIVE
orFORTHCOMING
, and which have had their metadata updated within a certain timeframe (i.e. since the last scheduled dissemination - as we will be making both initial submissions and updates).Also enables filtering by multiple
language_relations
. Filtering byupdated_at_with_relations
requires specifying a timestamp and whether the field value should be greater than (after) or less than (before) this timestamp.