Skip to content

Commit

Permalink
fix input types for filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Aug 21, 2024
1 parent 79d2dc8 commit 667ee37
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.

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

7 changes: 5 additions & 2 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: 2 additions & 8 deletions python_modules/dagster-graphql/dagster_graphql/schema/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@ class Meta:


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

Expand All @@ -390,11 +388,7 @@ class Meta:
name = "BulkActionsFilter"

def to_selector(self):
if self.status:
status = BulkActionStatus.from_graphql_input(self.status)
else:
status = None

status = BulkActionStatus[self.status.value] if self.status 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,6 @@ def test_get_backfills_with_filters():
backfill = instance.get_backfill(backfill_id)
all_backfills.append(backfill)

# on PartitionBackfills
get_backfills_result = execute_dagster_graphql(
context,
BACKFILLS_WITH_FILTERS_QUERY,
Expand All @@ -1200,3 +1199,9 @@ def test_get_backfills_with_filters():

for result in backfill_results:
assert result["timestamp"] > all_backfills[3].backfill_timestamp

get_backfills_result = execute_dagster_graphql(
context,
BACKFILLS_WITH_FILTERS_QUERY,
variables={"filters": {"status": "REQUESTED"}},
)

0 comments on commit 667ee37

Please sign in to comment.