Skip to content

Commit 6743e92

Browse files
committed
fix(ledger): keep the generated list_ledger_reports lifecycle optional
Declaring the operation variable `ReportLifecycle!` made ariadne-codegen emit a required `lifecycle` parameter on the generated `Client.list_ledger_reports`. A nullable variable is allowed there because the server argument carries its own default, and the generated method stays callable with no arguments. Claude-Session: https://claude.ai/code/session_01Jaz7hXqfysytKc57zpyWY6
1 parent 205dd6f commit 6743e92

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎robosystems_client/graphql/generated/client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def list_ledger_publish_lists(
769769
return ListLedgerPublishLists.model_validate(data)
770770

771771
def list_ledger_reports(
772-
self, lifecycle: ReportLifecycle, **kwargs: Any
772+
self, lifecycle: Union[Optional[ReportLifecycle], UnsetType] = UNSET, **kwargs: Any
773773
) -> ListLedgerReports:
774774
variables: dict[str, object] = {"lifecycle": lifecycle}
775775
response = self.execute(

‎robosystems_client/graphql/generated/operations.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@
15921592
"""
15931593

15941594
LIST_LEDGER_REPORTS_GQL = """
1595-
query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT) {
1595+
query ListLedgerReports($lifecycle: ReportLifecycle) {
15961596
reports(lifecycle: $lifecycle) {
15971597
reports {
15981598
id

‎robosystems_client/graphql/operations/ledger/ListLedgerReports.graphql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT) {
1+
query ListLedgerReports($lifecycle: ReportLifecycle) {
22
reports(lifecycle: $lifecycle) {
33
reports {
44
id name taxonomyId generationStatus filingStatus periodType

0 commit comments

Comments
 (0)