Home / Function/ get_graphql_response() — fastapi Function Reference

get_graphql_response() — fastapi Function Reference

Architecture documentation for the get_graphql_response() function in contributors.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  64e8d92b_1174_0872_5e7d_6421740a38ff["get_graphql_response()"]
  cf4b5bfd_e515_e220_1b74_2b9dbfada762["contributors.py"]
  64e8d92b_1174_0872_5e7d_6421740a38ff -->|defined in| cf4b5bfd_e515_e220_1b74_2b9dbfada762
  5d883755_3c62_6fe5_d0c5_9c8ecd734bd3["get_graphql_pr_edges()"]
  5d883755_3c62_6fe5_d0c5_9c8ecd734bd3 -->|calls| 64e8d92b_1174_0872_5e7d_6421740a38ff
  style 64e8d92b_1174_0872_5e7d_6421740a38ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/contributors.py lines 121–145

def get_graphql_response(
    *,
    settings: Settings,
    query: str,
    after: str | None = None,
) -> dict[str, Any]:
    headers = {"Authorization": f"token {settings.github_token.get_secret_value()}"}
    variables = {"after": after}
    response = httpx.post(
        github_graphql_url,
        headers=headers,
        timeout=settings.httpx_timeout,
        json={"query": query, "variables": variables, "operationName": "Q"},
    )
    if response.status_code != 200:
        logging.error(f"Response was not 200, after: {after}")
        logging.error(response.text)
        raise RuntimeError(response.text)
    data = response.json()
    if "errors" in data:
        logging.error(f"Errors in response, after: {after}")
        logging.error(data["errors"])
        logging.error(response.text)
        raise RuntimeError(response.text)
    return data

Domain

Subdomains

Frequently Asked Questions

What does get_graphql_response() do?
get_graphql_response() is a function in the fastapi codebase, defined in scripts/contributors.py.
Where is get_graphql_response() defined?
get_graphql_response() is defined in scripts/contributors.py at line 121.
What calls get_graphql_response()?
get_graphql_response() is called by 1 function(s): get_graphql_pr_edges.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free