INNER CODE UNIT · Python

fetch_repos

simonw/simonw · build_readme.py:321

def fetch_repos(query_string):
    """Paginate the repo search and return every matching repo node."""
    nodes = []
    after_cursor = None
    has_next_page = True

    while has_next_page:
        data = execute_query(build_search_query(query_string, after_cursor))
        search = data["data"]["search"]
        nodes.extend(search["nodes"])
        page_info = search["pageInfo"]
        has_next_page = page_info["hasNextPage"]
        after_cursor = page_info["endCursor"]

    return nodes


def build(query_string, full_release_pagination):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…