Skip to content

(*GraphQLClient).DoWithContext should expose response headers such as x-ratelimit-* #220

@apstndb

Description

@apstndb

(*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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions