Skip to content

feat(api): expose GraphQL response headers - #304

Open
efegokdemir wants to merge 1 commit into
cli:trunkfrom
efegokdemir:codex/issue-220-graphql-headers
Open

efegokdemir wants to merge 1 commit into
cli:trunkfrom
efegokdemir:codex/issue-220-graphql-headers

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

Expose HTTP response headers from GraphQL requests so callers can inspect metadata such as GitHub rate-limit headers.

Changes

  • Add DoWithContextAndHeaders, preserving the existing DoWithContext API.
  • Return a cloned header map for successful responses and HTTP errors.
  • Add regression coverage for X-RateLimit-Remaining.

Testing

  • go test ./pkg/api/...
  • go test ./...
  • go vet ./...
  • git diff --check

All checks pass.

Notes

The existing method delegates to the new method, so current callers retain the same behavior and signature. This contribution was prepared with AI assistance and manually reviewed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant