-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Milestone
Description
Context: The result of a few conversations about isolating views from GraphQL and filtering which hadn't been written to an issue.
The current subscription interface:
- The UI has multiple "views" each of which requires a different slice of the same data.
- The data requirements of a view might change as a user interacts with it.
- We currently merge the subscriptions to avoid duplicate request / storage / handling of data.
- We have one subscription for all workflows (dashboard, gscan).
- And one subscription per workflow.
Possible simplification:
- Rather than having views provide a GraphQL query in full have them provide a list of the fields they require for each object (workflow, task, etc).
- Have the workflow service construct / merge this into a subscription.
- Later on we can add extra fields for filtering.
For example a simple tree view might provide the following subscription:
subscription = {
'workflow': [
'id',
'status'
],
'task': [
'id',
'status'
],
'job': [
'id',
'status'
],
'task-filter': [
'failed',
'submit-failed'
]
}
Which the workflow service could construct into:
workflow {
id
status
task(states: ["failed", "submit-failed"]) {
id
status
}
job {
id
status
}
}
If a second subscription came along with a blank task-filter we could handle that intelligently in the UI code:
- task(states: ["failed", "submit-failed"]) {
+ task {
Metadata
Metadata
Assignees
Labels
No labels