async def METHOD_NAME(
    obj: Any, info: GraphQLResolveInfo, input: dict
) -> dict:
    labels = input.get("labels", [])
    labels.sort()
    cloud_context = context.get_context()
    agent_id = cloud_context.get("headers", {}).get("x-prefect-agent-id")
    result = await api.runs.get_runs_in_queue(
        tenant_id=input["tenant_id"],
        before=input.get("before"),
        labels=labels,
        agent_id=agent_id,
    )
    return {"flow_run_ids": result}