Skip to content

Commit 9d0c7b3

Browse files
committed
chore(graphql): [#65186] add date arguments to roles filter
This commit adds `from_date` and `to_date` to the seeded `it_system` filter for the `roles` field resolver on `itsystems`. While it is not strictly necessary right now, it is added to ease the migration to consistent filtering in the future.
1 parent 8a7caf4 commit 9d0c7b3

File tree

1 file changed

+14
-1
lines changed
  • backend/mora/graphapi/versions/latest

1 file changed

+14
-1
lines changed

backend/mora/graphapi/versions/latest/schema.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2612,7 +2612,20 @@ async def user_key(self, root: ITSystemRead) -> str:
26122612
resolver=to_response_list(LazyClass)(
26132613
seed_resolver(
26142614
class_resolver,
2615-
{"it_system": lambda root: ITSystemFilter(uuids=uuid2list(root.uuid))},
2615+
{
2616+
"it_system": lambda root: ITSystemFilter(
2617+
uuids=uuid2list(root.uuid),
2618+
# The following two arguments are not strictly necessary because
2619+
# we are filtering by UUIDs which handles dates differently than
2620+
# normal filters.
2621+
# If we were to instead filter by say 'user_keys' the arguments
2622+
# would be necessary. They are added here anyway to simplify the
2623+
# migration in the future when our filtering achieve consistent
2624+
# behavior across all filters.
2625+
from_date=None,
2626+
to_date=None,
2627+
)
2628+
},
26162629
)
26172630
),
26182631
description=dedent(

0 commit comments

Comments
 (0)