Switch to GRAPH context, see identifier with `ls` command
(context, graph_identifier)
| 69 | ) |
| 70 | @click.argument("GRAPH_IDENTIFIER", required=True) |
| 71 | def use(context, graph_identifier): |
| 72 | """Switch to GRAPH context, see identifier with `ls` command""" |
| 73 | try: |
| 74 | graph_identifier = get_graph_id_by_name(graph_identifier) |
| 75 | graph_name = get_graph_name_by_id(graph_identifier) |
| 76 | switch_context(graph_identifier, graph_name) |
| 77 | except Exception as e: |
| 78 | err(f"Failed to switch context: {str(e)}") |
| 79 | else: |
| 80 | click.secho(f"Using GRAPH {graph_name}(id={graph_identifier})", fg="green") |
| 81 | |
| 82 | |
| 83 | @cli.command() |
nothing calls this directly
no test coverage detected