Skip to content

Commit

Permalink
gql
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Aug 22, 2024
1 parent c87e7f2 commit d14e094
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions python_modules/dagster-graphql/dagster_graphql/schema/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ class Meta:


class GrapheneBulkActionsFilter(graphene.InputObjectType):
status = graphene.InputField("dagster_graphql.schema.backfill.GrapheneBulkActionStatus")
statuses = graphene.List(
graphene.NonNull("dagster_graphql.schema.backfill.GrapheneBulkActionStatus")
)
createdBefore = graphene.InputField(graphene.Float)
createdAfter = graphene.InputField(graphene.Float)

Expand All @@ -388,12 +390,14 @@ class Meta:
name = "BulkActionsFilter"

def to_selector(self):
status = BulkActionStatus[self.status.value] if self.status else None
statuses = (
[BulkActionStatus[status.value] for status in self.statuses] if self.statuses else None
)
created_before = datetime_from_timestamp(self.createdBefore) if self.createdBefore else None
created_after = datetime_from_timestamp(self.createdAfter) if self.createdAfter else None

return BulkActionsFilter(
status=status,
statuses=statuses,
created_before=created_before,
created_after=created_after,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,5 +1203,5 @@ def test_get_backfills_with_filters():
get_backfills_result = execute_dagster_graphql(
context,
BACKFILLS_WITH_FILTERS_QUERY,
variables={"filters": {"status": "REQUESTED"}},
variables={"filters": {"statuses": ["REQUESTED"]}},
)
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def get_backfills(
raise DagsterInvariantViolationError(
"Conflicting status filters provided to get_backfills. Choose one of status or BulkActionsFilter.statuses."
)
statuses = [status] or (filters.statuses if filters else None)
statuses = [status] if status else (filters.statuses if filters else None)
assert statuses
query = query.where(
BulkActionsTable.c.status.in_([status.value for status in statuses])
Expand Down

0 comments on commit d14e094

Please sign in to comment.