With the workspace id (retrieve from workspace URL), you can use this query to obtain all the boards. Unfortunately it also provides “sub_items_board”, but you filter those out:
query {
boards(state: active, limit: 200, workspace_ids:12345678) {
name
type
id
}
}