def METHOD_NAME(quay_api_store):
    gqlapi = gql.get_api()
    result = gqlapi.query(QUAY_REPOS_QUERY)
    state = []
    seen_repos = set()
    # fetch from quayRepos
    for app in result["apps"]:
        quay_repos = app.get("quayRepos")
        if quay_repos is None:
            continue
        for quay_repo in quay_repos:
            org_name = quay_repo["org"]["name"]
            if not quay_repo["org"]["managedRepos"]:
                logging.error(
                    f"[{app['name']}] Can not manage repos in {org_name} "
                    "since managedRepos is set to false."
                )
                sys.exit(ExitCodes.ERROR)
            instance_name = quay_repo["org"]["instance"]["name"]
            org_key = OrgKey(instance_name, org_name)
            for repo_item in quay_repo["items"]:
                name = repo_item["name"]
                public = repo_item["public"]
                description = repo_item["description"].strip()
                repo = RepoInfo(org_key, name, public, description)
                if (org_key, name) in seen_repos:
                    logging.error(
                        f"Repo {org_key.instance}/"
                        f"{org_key.org_name}/{name} is duplicated"
                    )
                    sys.exit(ExitCodes.ERROR)
                seen_repos.add((org_key, name))
                state.append(repo)
                # downstream orgs
                downstream_orgs = get_downstream_orgs(quay_api_store, org_key)
                for downstream_org_key in downstream_orgs:
                    downstream_repo = RepoInfo(
                        downstream_org_key, name, public, description
                    )
                    state.append(downstream_repo)
    return state