(*GraphQLClient).DoWithContext currently reads and unmarshals the response body, but the original HTTP response headers are discarded.
Because of this, callers cannot access response headers such as x-ratelimit-* from GraphQL requests.
While rate limit information can sometimes be fetched via the GraphQL rateLimit { ... } field, that is only available when it can be included in the query response, and it is not a practical substitute in all cases. In particular, this does not help for mutations, where callers may still want to inspect the HTTP response headers directly.
It would be helpful if the method populated or exposed the response headers so rate limit information can be retrieved by callers.
Relevant code
(*GraphQLClient).DoWithContextcurrently reads and unmarshals the response body, but the original HTTP response headers are discarded.Because of this, callers cannot access response headers such as
x-ratelimit-*from GraphQL requests.While rate limit information can sometimes be fetched via the GraphQL
rateLimit { ... }field, that is only available when it can be included in the query response, and it is not a practical substitute in all cases. In particular, this does not help for mutations, where callers may still want to inspect the HTTP response headers directly.It would be helpful if the method populated or exposed the response headers so rate limit information can be retrieved by callers.
Relevant code
pkg/api/graphql_client.go