You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): resolve infinite recursion in _dereference_refs_helper with mixed $ref objects
Fixes infinite recursion issue in JSON schema dereferencing when objects contain both $ref and other properties (e.g., nullable, description, additionalProperties).
**Problem:**
- Commit fb5da83 changed the condition from `set(obj.keys()) == {"$ref"}` to `"$ref" in set(obj.keys())`
- This caused objects with $ref + other properties to be treated as pure $ref nodes
- Result: other properties were lost and infinite recursion occurred with complex schemas
**Solution:**
- Restore pure $ref detection for objects with only $ref key
- Add proper handling for mixed $ref objects that preserves all properties
- Merge resolved reference content with other properties
- Maintain cycle detection to prevent infinite recursion
**Impact:**
- Fixes Apollo MCP server schema integration (#32511)
- Resolves tool binding infinite recursion with complex GraphQL schemas
- Preserves backward compatibility with existing functionality
- No performance impact - actually improves handling of complex schemas
Fixes#32511
0 commit comments