Skip to content

fix: decode GraphQL response when using the Guzzle HTTP client - #287

Merged
andrii-bodnar merged 1 commit into
masterfrom
graphql-fix
Oct 1, 2026
Merged

andrii-bodnar merged 1 commit into
masterfrom
graphql-fix

Conversation

@bhdnb

@bhdnb bhdnb commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

GuzzleHttpClient returns a PSR-7 stream, and GraphqlApi passed it straight to json_decode() under strict_types, raising a TypeError. Cast the response to string before decoding.

@bhdnb
bhdnb requested a review from andrii-bodnar October 1, 2026 10:14
@bhdnb bhdnb self-assigned this Oct 1, 2026
@bhdnb bhdnb added the bug Something isn't working label Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (d96d4d9) to head (0116f4c).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #287      +/-   ##
============================================
+ Coverage     95.10%   95.21%   +0.11%     
  Complexity     2540     2540              
============================================
  Files           217      217              
  Lines          6959     6959              
============================================
+ Hits           6618     6625       +7     
+ Misses          341      334       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrii-bodnar
andrii-bodnar merged commit d2e5796 into master Oct 1, 2026
14 checks passed
@andrii-bodnar
andrii-bodnar deleted the graphql-fix branch October 1, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants