{"modulePath":"github.com/uber/submitqueue","version":"v0.3.0-20261125210437-add1a4bd2ea2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package githubapi\n\nPackage githubapi holds the request conventions shared by every component that calls the GitHub API directly: the REST headers, pinned to one API version, and the GraphQL request and response envelope.\n\nIt is not a client. Callers keep their own \\*http.Client, with the API root resolved by platform/http.BaseURLTransport and auth set by a transport, and their own typed requests; this package only removes the parts every caller would otherwise repeat.\n\n## Constants\n\n```go\nconst Version = \"2026-03-10\"\n```\nVersion is the GitHub REST API version every REST request pins.\n\n## Functions\n\n```go\nfunc QueryGraphQL(ctx context.Context, client *http.Client, req GraphQLRequest, data any) error\n```\nQueryGraphQL posts req to the client's /graphql and decodes the response's data into data. A non-200 reply is a \\*platform/http.StatusError, so error classifiers can read its code; a 200 reply that carries errors fails even when it also carries data. A null data leaves data untouched.\n\n```go\nfunc SetRESTHeaders(req *http.Request)\n```\nSetRESTHeaders sets the headers of a JSON request to the GitHub REST API. It has the signature platform/http.SendRequest takes for its setHeaders.\n\n## Types\n\n```go\ntype GraphQLRequest struct {\n\t// Query is the GraphQL document.\n\tQuery string `json:\"query\"`\n\t// Variables binds the query's variables by name.\n\tVariables map[string]any `json:\"variables\"`\n}\n```\nGraphQLRequest is the body of a request to the GitHub GraphQL API.\n\n","path":"github.com/uber/submitqueue/platform/githubapi","name":"githubapi","synopsis":"Package githubapi holds the request conventions shared by every component that calls the GitHub API directly: the REST headers, pinned to one API version, and the GraphQL request and response envelope.","isRedistributable":true}
