[none]: refactor connection#5
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the GitHub.Client.Connection by introducing a shared fetch helper to handle HTTP requests, redirects, and rate limiting for both REST and GraphQL calls. Several critical issues were identified in the review: the internal fetch method requires the @usableFromInline attribute to be compatible with public inlinable methods, the GraphQL post implementation currently fails to send the required query in the request body, and a regression was introduced by hardcoding the RateLimitError type, which breaks generic support.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the GitHub.Client.Connection to use a shared internal fetch method for both REST and GraphQL requests, improving code reuse and handling redirects and rate limits consistently. Feedback includes marking the fetch method as @usableFromInline to support its use in public @inlinable methods, fixing a logic error where the HTTP status code might not be captured correctly during redirects, and maintaining consistency by using Void instead of () for generic specialization.
No description provided.