fix(graphql): select the reconciling-item fields on the fiscal calendar query - #196
Conversation
…ar query The 1.12.0 schema refresh added reconcilingItemCount and reconcilingItemSample to FiscalCalendar, but the GetLedgerFiscalCalendar operation document was not updated to select them, so the typed GraphQL model lacked fields the REST FiscalCalendarResponse already carried. Adds them to the selection set, regenerates the model, and covers both in the fiscal-calendar tests.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 3s —— View job Review complete ✅
Verdict: Looks good — no changes requested. This is a small, well-scoped fix and every changed file is internally consistent:
One caveat: I couldn't execute Nice catch closing the gap from the #194 post-merge review, and thanks for the "operation |
Summary
Closes the gap the post-merge review of #194 found: the 1.12.0 schema refresh added
reconcilingItemCount/reconcilingItemSampletoFiscalCalendar, but theGetLedgerFiscalCalendaroperation document was never updated to select them, so the typed GraphQL model exposed neither field while the RESTFiscalCalendarResponsecarried both.Changes
robosystems_client/graphql/operations/ledger/GetLedgerFiscalCalendar.graphql— selects the two fields.robosystems_client/graphql/generated/get_ledger_fiscal_calendar.py,generated/operations.py— output ofjust generate-graphql, unedited:reconciling_item_count: intandreconciling_item_sample: list[str]onGetLedgerFiscalCalendarFiscalCalendar(required, matchingInt!/[String!]!in the schema), and the query string.tests/test_ledger_client.py— both fiscal-calendar fixtures carry the fields and both tests assert them.Procedural note for the next regen:
just refresh-schemaupdates the snapshot, but the operation.graphqldocuments are hand-maintained — a new field on a type is not selected until its query is edited.Compatibility
Additive on the generated tier (two new attributes on a generated Pydantic model;
LedgerClient.get_fiscal_calendarreturns the same type with more data). Rides the next client minor per the two-tier contract; no facade signature changes. Callers constructingGetLedgerFiscalCalendarFiscalCalendarby hand from a payload that predates 1.11 of the API would now fail validation — the server has returned both fields since API v1.11.0, and the model is a response type, not an input.Testing
just test-all— 526 passed, 17 skipped; ruff format, ruff check, basedpyright cleanjust generate-graphqlis clean after the edit (the drift gate's condition)