Skip to content

v0.9.5: Fix for update_holding_quantity GraphQL Schema Issues

Choose a tag to compare

@keithah keithah released this 15 Sep 20:24
· 38 commits to main since this release

πŸ› Critical Fix: update_holding_quantity GraphQL Schema Issues

Problem Solved

This release fixes the "Something went wrong while processing: None" error in update_holding_quantity that was identified through the new debug logging feature in v0.9.4.

Root Cause

Monarch Money updated their GraphQL API schema, removing several response fields from the updateHolding mutation:

  • quantity, costBasisPerShare, currentValue, totalReturn, totalReturnPercent
  • Changed errors.messages to PayloadErrorFields format

What's Fixed

  • βœ… Updated GraphQL schema to only request fields that still exist
  • βœ… Enhanced error handling with new PayloadErrorFields format
  • βœ… Simplified response returns {"id": "...", "updated": true} on success
  • βœ… Better error messages from improved error parsing

For Issue #27 Users

# Upgrade to get the fix
pip install --upgrade monarchmoney-enhanced

# Should now work!
result = await svc.update_holding_quantity(holding_id, quantity)
print(result)  # {"id": "...", "updated": true}

Debug Logging Success Story

The v0.9.4 debug feature (MonarchMoney(debug=True)) was instrumental in identifying this issue. The detailed GraphQL request/response logs showed exactly which fields were causing the API errors.

Breaking Change Note

The update_holding_quantity response format has changed from detailed holding information to a simple success confirmation, as the detailed fields are no longer available from Monarch Money's API.

Resolves: #27
Debug logs that led to this fix: #27 (comment)