(graph: dict)
| 105 | |
| 106 | |
| 107 | def create_graph(graph: dict) -> str: |
| 108 | context = get_current_context() |
| 109 | with graphscope.flex.rest.ApiClient( |
| 110 | graphscope.flex.rest.Configuration(context.coordinator_endpoint) |
| 111 | ) as api_client: |
| 112 | api_instance = graphscope.flex.rest.GraphApi(api_client) |
| 113 | response = api_instance.create_graph(CreateGraphRequest.from_dict(graph)) |
| 114 | return response.graph_id |
| 115 | |
| 116 | |
| 117 | def delete_graph_by_id(graph_identifier: str) -> str: |