Repository: alibaba/GraphScope (language: python)

Issue:
feat(interactive): Support retrieving current running schema of the query service
Add a API which returns the current running graph's schema, can be used by compiler for generating plan.


Discussion / hints:

Fix patch:
diff --git a/.gitignore b/.gitignore
index e9bfb63cc059..5fb9bd9c77aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -116,6 +116,7 @@ flex/interactive/sdk/java/gradlew
 flex/interactive/sdk/java/.travis.yml
 flex/interactive/sdk/java/git_push.sh
 flex/interactive/sdk/java/gradle/
+flex/interactive/sdk/java/api/
 flex/interactive/sdk/java/.openapi-generator/*
 flex/interactive/sdk/java/src/main/AndroidManifest.xml
 flex/interactive/sdk/java/.openapi-generate/
diff --git a/flex/engines/http_server/actor/admin_actor.act.cc b/flex/engines/http_server/actor/admin_actor.act.cc
index b31e83638f72..c0bd8a5ecac8 100644
--- a/flex/engines/http_server/actor/admin_actor.act.cc
+++ b/flex/engines/http_server/actor/admin_actor.act.cc
@@ -446,6 +446,20 @@ seastar::future<admin_query_result> admin_actor::run_delete_graph(
     query_param&& query_param) {
   LOG(INFO) << "Delete graph: " << query_param.content;
 
+  auto lock_info = metadata_store_->GetGraphIndicesLocked(query_param.content);
+  if (!lock_info.ok()) {
+    LOG(ERROR) << "Fail to get lock info for graph: " << query_param.content;
+    return seastar::make_ready_future<admin_query_result>(
+        gs::Result<seastar::sstring>(lock_info.status()));
+  }
+  if (lock_info.value()) {
+    LOG(ERROR) << "Graph is running, cannot delete: " << query_param.content;
+    return seastar::make_ready_future<admin_query_result>(
+        gs::Result<seastar::sstring>(gs::Status(
+            gs::StatusCode::AlreadyLocked,
+            "Graph is running, cannot delete: " + query_param.content)));
+  }
+
   auto get_res = metadata_store_->GetGraphMeta(query_param.content);
   if (!get_res.ok()) {
     LOG(ERROR) << "Graph not exists: " << query_param.content;
@@ -779,10 +793,7 @@ seastar::future<admin_query_result> admin_actor::start_service(
 
   auto cur_running_graph_res = metadata_store_->GetRunningGraph();
   if (!cur_running_graph_res.ok()) {
-    LOG(ERROR) << "Fail to get running graph: "
-               << cur_running_graph_res.status().error_message();
-    return seastar::make_ready_future<admin_query_result>(
-        gs::Result<seastar::sstring>(cur_running_graph_res.status()));
+    LOG(INFO) << "No running graph, will start on the graph in request";
   }
   auto cur_running_graph = cur_running_graph_res.value();
   LOG(INFO) << "Current running graph: " << cur_running_graph;
@@ -973,17 +984,41 @@ seastar::future<admin_query_result> admin_actor::start_service(
 seastar::future<admin_query_result> admin_actor::stop_service(
     query_param&& query_param) {
   auto& hqps_service = HQPSService::get();
-  return hqps_service.stop_query_actors().then([&hqps_service] {
+  return hqps_service.stop_query_actors().then([this, &hqps_service] {
     LOG(INFO) << "Successfully stopped query handler";
-    if (hqps_service.stop_compiler_subprocess()) {
-      LOG(INFO) << "Successfully stop compiler";
-      return seastar::make_ready_future<admin_query_result>(
-          gs::Result<seastar::sstring>("Successfully stop service"));
-    } else {
-      LOG(ERROR) << "Fail to stop compiler";
-      return seastar::make_ready_future<admin_query_result>(
-          gs::Result<seastar::sstring>(gs::Status(gs::StatusCode::InternalError,
-                                                  "Fail to stop compiler")));
+    // Add also remove current running graph
+    {
+      std::lock_guard<std::mutex> lock(mtx_);
+      // unlock the graph
+      auto cur_running_graph_res = metadata_store_->GetRunningGraph();
+      if (cur_running_graph_res.ok()) {
+        auto unlock_res =
+            metadata_store_->UnlockGraphIndices(cur_running_graph_res.value());
+        if (!unlock_res.ok()) {
+          LOG(ERROR) << "Fail to unlock graph: "
+                     << cur_running_graph_res.value();
+          return seastar::make_ready_future<admin_query_result>(
+              gs::Result<seastar::sstring>(unlock_res.status()));
+        }
+        if (!metadata_store_->ClearRunningGraph().ok()) {
+          LOG(ERROR) << "Fail to clear running graph";
+          return seastar::make_ready_future<admin_query_result>(
+              gs::Result<seastar::sstring>(
+                  gs::Status(gs::StatusCode::InternalError,
+                             "Fail to clear running graph")));
+        }
+      }
+
+      if (hqps_service.stop_compiler_subprocess()) {
+        LOG(INFO) << "Successfully stop compiler";
+        return seastar::make_ready_future<admin_query_result>(
+            gs::Result<seastar::sstring>("Successfully stop service"));
+      } else {
+        LOG(ERROR) << "Fail to stop compiler";
+        return seastar::make_ready_future<admin_query_result>(
+            gs::Result<seastar::sstring>(gs::Status(
+                gs::StatusCode::InternalError, "Fail to stop compiler")));
+      }
     }
   });
 }
@@ -1001,9 +1036,13 @@ seastar::future<admin_query_result> admin_actor::service_status(
     res["bolt_port"] = hqps_service.get_service_config().bolt_port;
     res["gremlin_port"] = hqps_service.get_service_config().gremlin_port;
     if (running_graph_res.ok()) {
-      res["graph_id"] = running_graph_res.value();
+      auto graph_meta =
+          metadata_store_->GetGraphMeta(running_graph_res.value());
+      if (graph_meta.ok()) {
+        res["graph"] = nlohmann::json::parse(graph_meta.value().ToJson());
+      }
     } else {
-      res["graph_id"] = "UNKNOWN";
+      res["graph"] = {};
     }
   } else {
     LOG(INFO) << "Query service has not been inited!";
diff --git a/flex/engines/http_server/service/hqps_service.cc b/flex/engines/http_server/service/hqps_service.cc
index 6634aa31c07f..71e802fd98b4 100644
--- a/flex/engines/http_server/service/hqps_service.cc
+++ b/flex/engines/http_server/service/hqps_service.cc
@@ -264,6 +264,8 @@ bool HQPSService::start_compiler_subprocess(
     // check query server port is ready
     if (check_compiler_ready()) {
       LOG(INFO) << "Compiler server is ready!";
+      // sleep another 2 seconds to make sure the server is ready
+      std::this_thread::sleep_for(std::chrono::seconds(2));
       return true;
     }
     sleep_time += sleep_interval;
diff --git a/flex/interactive/sdk/java/api/openapi.yaml b/flex/interactive/sdk/java/api/openapi.yaml
deleted file mode 100644
index 382eb69e9fc5..000000000000
--- a/flex/interactive/sdk/java/api/openapi.yaml
+++ /dev/null
@@ -1,2172 +0,0 @@
-openapi: 3.0.3
-info:
-  contact:
-    email: graphscope@alibaba-inc.com
-  description: |
-    This is the definition of GraphScope Interactive API, including
-      - AdminService API
-      - Vertex/Edge API
-      - QueryService
-
-
-    AdminService API (with tag AdminService) defines the API for GraphManagement, ProcedureManagement and Service Management.
-
-    Vertex/Edge API (with tag GraphService) defines the API for Vertex/Edge management, including creation/updating/delete/retrive.
-
-    QueryService API (with tag QueryService) defines the API for procedure_call, Ahodc query.
-  license:
-    name: Apache 2.0
-    url: http://www.apache.org/licenses/LICENSE-2.0.html
-  title: GraphScope Interactive API v0.0.3
-  version: 1.0.0
-externalDocs:
-  description: Find out More about GraphScope
-  url: http://graphscope.io
-servers:
-- description: SwaggerHub API Auto Mocking
-  url: https://virtserver.swaggerhub.com/GRAPHSCOPE/InteractiveAPI/1.0.0
-- description: SwaggerHub API Auto Mocking
-  url: https://virtserver.swaggerhub.com/GRAPHSCOPE/interactive/1.0.0
-tags:
-- description: GraphManagement
-  name: AdminService/GraphManagement
-- description: ProcedureManagement
-  name: AdminService/ProcedureManagement
-- description: ServiceManagement
-  name: AdminService/ServiceManagement
-- description: VertexManagement
-  name: GraphService/VertexManagement
-- description: EdgeManagement
-  name: GraphService/EdgeManagement
-- description: Graph query
-  name: QueryService
-paths:
-  /v1/graph:
-    get:
-      description: List all graphs
-      operationId: list_graphs
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                items:
-                  $ref: '#/components/schemas/GetGraphResponse'
-                type: array
-          description: Successful operation
-      tags:
-      - AdminService/GraphManagement
-      x-accepts: application/json
-    post:
-      description: Create a new graph
-      operationId: create_graph
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/CreateGraphRequest'
-        required: true
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/CreateGraphResponse'
-          description: successful operation
-        "400":
-          content:
-            application/json:
-              schema:
-                type: string
-          description: BadRequest
-        "500":
-          content:
-            application/json:
-              schema:
-                type: string
-          description: Internal error
-      tags:
-      - AdminService/GraphManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/graph/{graph_id}:
-    delete:
-      description: Delete a graph by name
-      operationId: delete_graph
-      parameters:
-      - description: The name of graph to delete
-        explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              example: Successfully delete graph
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successful operation
-        "404":
-          content:
-            application/json:
-              example: Graph not found
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Not Found
-        "500":
-          content:
-            application/json:
-              example: "Internal Error: "
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Internal Error
-      tags:
-      - AdminService/GraphManagement
-      x-accepts: application/json
-    get:
-      description: Get a graph by name
-      operationId: get_graph
-      parameters:
-      - description: The name of graph to get
-        explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/GetGraphResponse'
-          description: Successful operation
-        "404":
-          content:
-            application/json:
-              schema:
-                example: graph not exists
-                type: string
-          description: Not found
-      tags:
-      - AdminService/GraphManagement
-      x-accepts: application/json
-  /v1/graph/{graph_id}/schema:
-    get:
-      description: Get schema by graph name
-      operationId: get_schema
-      parameters:
-      - description: The name of graph to delete
-        explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/GetGraphSchemaResponse'
-          description: successful operation
-      tags:
-      - AdminService/GraphManagement
-      x-accepts: application/json
-  /v1/graph/{graph_id}/dataloading:
-    post:
-      description: Create a dataloading job
-      operationId: create_dataloading_job
-      parameters:
-      - description: The name of graph to do bulk loading.
-        explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/SchemaMapping'
-        required: true
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/JobResponse'
-          description: successful operation
-      tags:
-      - AdminService/GraphManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/job/{job_id}:
-    delete:
-      operationId: delete_job_by_id
-      parameters:
-      - explode: false
-        in: path
-        name: job_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              example: "Successfully cancel job: 123"
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successful operation
-      tags:
-      - AdminService/JobManagement
-      x-accepts: application/json
-    get:
-      operationId: get_job_by_id
-      parameters:
-      - description: "The id of the job, returned from POST /v1/graph/{graph_id}/dataloading"
-        explode: false
-        in: path
-        name: job_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/JobStatus'
-          description: successful operation
-      tags:
-      - AdminService/JobManagement
-      x-accepts: application/json
-  /v1/job:
-    get:
-      operationId: list_jobs
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                items:
-                  $ref: '#/components/schemas/JobStatus'
-                type: array
-          description: successful operation
-      tags:
-      - AdminService/JobManagement
-      x-accepts: application/json
-  /v1/graph/{graph_id}/procedure:
-    get:
-      description: List all procedures
-      operationId: list_procedures
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                items:
-                  $ref: '#/components/schemas/GetProcedureResponse'
-                type: array
-          description: Successful operation
-        "404":
-          content:
-            application/json:
-              schema:
-                example: Graph not found
-                type: string
-          description: Not found
-      tags:
-      - AdminService/ProcedureManagement
-      x-accepts: application/json
-    post:
-      description: Create a new procedure on a graph
-      operationId: create_procedure
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/CreateProcedureRequest'
-        required: true
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/CreateProcedureResponse'
-          description: successful operation
-        "400":
-          content:
-            application/json:
-              example: Bad request
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Bad request
-        "404":
-          content:
-            application/json:
-              example: Graph not found
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: not found
-        "500":
-          content:
-            application/json:
-              example: Internal error
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Internal Error
-      tags:
-      - AdminService/ProcedureManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/graph/{graph_id}/procedure/{procedure_id}:
-    delete:
-      description: Delete a procedure on a graph by name
-      operationId: delete_procedure
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - explode: false
-        in: path
-        name: procedure_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successful operation
-        "404":
-          content:
-            application/json:
-              schema:
-                example: Graph Not found/Procedure Not found
-                type: string
-          description: Not Found
-      tags:
-      - AdminService/ProcedureManagement
-      x-accepts: application/json
-    get:
-      description: Get a procedure by name
-      operationId: get_procedure
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - explode: false
-        in: path
-        name: procedure_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/GetProcedureResponse'
-          description: successful operation
-        "404":
-          content:
-            application/json:
-              schema:
-                example: Graph not found/procedure not found
-                type: string
-          description: Not found
-      tags:
-      - AdminService/ProcedureManagement
-      x-accepts: application/json
-    put:
-      description: Update procedure on a graph by name
-      operationId: update_procedure
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - explode: false
-        in: path
-        name: procedure_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/UpdateProcedureRequest'
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successful operation
-        "400":
-          content:
-            application/json:
-              schema:
-                example: bad request
-                type: string
-          description: Bad request
-        "404":
-          content:
-            application/json:
-              schema:
-                example: Graph Not found/Procedure Not found
-                type: string
-          description: Not Found
-        "500":
-          content:
-            application/json:
-              schema:
-                example: bad request
-                type: string
-          description: Internal error
-      tags:
-      - AdminService/ProcedureManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/service/start:
-    post:
-      description: Start service on a specified graph
-      operationId: start_service
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/StartServiceRequest'
-        description: Start service on a specified graph
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: successful operation
-        "500":
-          content:
-            application/json:
-              schema:
-                example: Internal Error
-                type: string
-          description: Internal Error
-      tags:
-      - AdminService/ServiceManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/service/stop:
-    post:
-      description: Stop current service
-      operationId: stop_service
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: successful operation
-      tags:
-      - AdminService/ServiceManagement
-      x-accepts: application/json
-  /v1/service/restart:
-    post:
-      description: Start current service
-      operationId: restart_service
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: successful operation
-      tags:
-      - AdminService/ServiceManagement
-      x-accepts: application/json
-  /v1/service/status:
-    get:
-      description: Get service status
-      operationId: get_service_status
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ServiceStatus'
-          description: successful operation
-      tags:
-      - AdminService/ServiceManagement
-      x-accepts: application/json
-  /v1/graph/{graph_id}/vertex:
-    delete:
-      description: |
-        Remove the vertex from the specified graph.
-      operationId: delete_vertex
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - description: The label name of querying vertex.
-        explode: true
-        in: query
-        name: label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The value of the querying vertex's primary key
-        explode: true
-        in: query
-        name: primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfully delete vertex
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully delete vertex
-        "400":
-          description: Invalid input vertex
-        "404":
-          description: Vertex not exists or Graph not exits.
-        "500":
-          description: Server internal error
-      summary: Remove vertex from the graph
-      tags:
-      - GraphService/VertexManagement
-      x-accepts: application/json
-    get:
-      description: |
-        Get the properties for the specified vertex.
-        example:
-        ```http
-        GET /endpoint?param1=value1&param2=value2 HTTP/1.1
-        Host: example.com
-        ```
-      operationId: get_vertex
-      parameters:
-      - description: The name of the graph
-        explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - description: The label name of querying vertex.
-        explode: true
-        in: query
-        name: label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The primary key value of querying vertex.
-        explode: true
-        in: query
-        name: primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                label: person
-                values:
-                - name: id
-                  value: 1
-                - name: age
-                  value: 23
-                - name: name
-                  value: amy
-              schema:
-                $ref: '#/components/schemas/VertexData'
-          description: Found vertex
-        "400":
-          description: Bad input parameter
-        "404":
-          description: Vertex not found or graph not found
-        "500":
-          description: Server internal error
-      summary: Get the vertex's properties with vertex primary key.
-      tags:
-      - GraphService/VertexManagement
-      x-accepts: application/json
-    post:
-      description: |
-        Add the provided vertex to the specified graph.
-      operationId: add_vertex
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            example:
-              label: person
-              primimary_key_value: 1
-              properties:
-                age: 2
-                name: Bob
-            schema:
-              $ref: '#/components/schemas/VertexRequest'
-        description: Add vertex to graph.
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfully created vertex
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully created vertex
-        "400":
-          description: Invalid input vertex
-        "404":
-          description: Graph not found
-        "409":
-          description: Vertex already exists
-        "500":
-          description: Server internal error
-      summary: Add vertex to the graph
-      tags:
-      - GraphService/VertexManagement
-      x-content-type: application/json
-      x-accepts: application/json
-    put:
-      description: |
-        Remove the vertex from the specified graph.
-      operationId: update_vertex
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            example:
-              label: person
-              primary_key_value: 2
-              properties:
-                age: 24
-                name: Cindy
-            schema:
-              $ref: '#/components/schemas/VertexRequest'
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfully updated vertex
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully update vertex
-        "400":
-          description: Invalid input paramters
-        "404":
-          description: Vertex not exists
-        "500":
-          description: Server internal error
-      summary: Update vertex's property
-      tags:
-      - GraphService/VertexManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/graph/{graph_id}/edge:
-    delete:
-      description: |
-        Remove the edge from current graph.
-      operationId: delete_edge
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - description: The label name of src vertex.
-        example: person
-        explode: true
-        in: query
-        name: src_label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The primary key value of src vertex.
-        example: 1
-        explode: true
-        in: query
-        name: src_primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      - description: The label name of dst vertex.
-        example: software
-        explode: true
-        in: query
-        name: dst_label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The primary key value of dst vertex.
-        example: 3
-        explode: true
-        in: query
-        name: dst_primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfully delete edge
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully delete edge
-        "400":
-          description: Invalid input edge
-        "404":
-          description: Edge not exists or Graph not exits
-        "500":
-          description: Server internal error
-      summary: Remove edge from the graph
-      tags:
-      - GraphService/EdgeManagement
-      x-accepts: application/json
-    get:
-      description: |
-        Get the properties for the specified vertex.
-      operationId: get_edge
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      - description: The label name of querying edge.
-        example: created
-        explode: true
-        in: query
-        name: edge_label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The label name of src vertex.
-        example: person
-        explode: true
-        in: query
-        name: src_label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The primary key value of src vertex.
-        example: 1
-        explode: true
-        in: query
-        name: src_primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      - description: The label name of dst vertex.
-        example: software
-        explode: true
-        in: query
-        name: dst_label
-        required: true
-        schema:
-          type: string
-        style: form
-      - description: The value of dst vertex's primary key
-        example: 3
-        explode: true
-        in: query
-        name: dst_primary_key_value
-        required: true
-        schema:
-          $ref: '#/components/schemas/AnyValue'
-        style: form
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                src_label: person
-                dst_label: software
-                edge_label: created
-                src_pk_value: 1
-                dst_pk_value: 3
-                properties:
-                - name: weight
-                  value: 0.2
-              schema:
-                $ref: '#/components/schemas/EdgeData'
-          description: Found Edge
-        "400":
-          description: Bad input parameter
-        "404":
-          description: Edge not found or Graph not found
-        "500":
-          description: Server internal error
-      summary: Get the edge's properties with src and dst vertex primary keys.
-      tags:
-      - GraphService/EdgeManagement
-      x-accepts: application/json
-    post:
-      description: |
-        Add the edge to graph.
-      operationId: add_edge
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            example:
-              src_label: person
-              dst_label: software
-              edge_label: created
-              src_pk_name: id
-              src_pk_value: 1
-              dst_pk_name: id
-              dst_pk_value: 3
-              properties:
-              - name: weight
-                value: 0.2
-            schema:
-              $ref: '#/components/schemas/EdgeRequest'
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfuly create edge
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully insert the edge
-        "400":
-          description: Invalid input edge
-        "409":
-          description: edge already exists
-        "500":
-          description: Server internal error
-      summary: Add edge to the graph
-      tags:
-      - GraphService/EdgeManagement
-      x-content-type: application/json
-      x-accepts: application/json
-    put:
-      description: |
-        Update the edge on the running graph.
-      operationId: update_edge
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            example:
-              src_label: person
-              dst_label: software
-              edge_label: created
-              src_pk_name: id
-              src_pk_value: 1
-              dst_pk_name: id
-              dst_pk_value: 3
-              properties:
-              - name: weight
-                value: 0.3
-            schema:
-              $ref: '#/components/schemas/EdgeRequest'
-      responses:
-        "200":
-          content:
-            application/json:
-              example:
-                message: Successfully update edge
-              schema:
-                $ref: '#/components/schemas/APIResponse'
-          description: Successfully update edge
-        "400":
-          description: Invalid input paramters
-        "404":
-          description: Edge not exists
-        "500":
-          description: Server internal error
-      summary: Update edge's property
-      tags:
-      - GraphService/EdgeManagement
-      x-content-type: application/json
-      x-accepts: application/json
-  /v1/graph/{graph_id}/query:
-    post:
-      description: |
-        After the procedure is created, user can use this API to run the procedure.
-        TODO: a full example cypher->plan->json.
-        TODO: make sure typeinfo can be passed.
-      operationId: proc_call
-      parameters:
-      - explode: false
-        in: path
-        name: graph_id
-        required: true
-        schema:
-          type: string
-        style: simple
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/QueryRequest'
-      responses:
-        "200":
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/CollectiveResults'
-          description: Successfully runned. Empty if failed?
-        "500":
-          description: Server internal error
-      summary: run queries on graph
-      tags:
-      - QueryService
-      x-content-type: application/json
-      x-accepts: application/json
-components:
-  schemas:
-    AnyValue: {}
-    TypedValue:
-      example:
-        type: null
-        value: ""
-      properties:
-        type:
-          $ref: '#/components/schemas/GSDataType'
-        value: {}
-      required:
-      - type
-      - value
-      type: object
-    Element:
-      oneOf:
-      - $ref: '#/components/schemas/TypedValue'
-    Collection:
-      properties:
-        values:
-          items:
-            $ref: '#/components/schemas/Element'
-          type: array
-      type: object
-    KeyValue:
-      properties:
-        key:
-          $ref: '#/components/schemas/TypedValue'
-        value:
-          $ref: '#/components/schemas/Element'
-      required:
-      - key
-      - value
-      type: object
-    Column:
-      oneOf:
-      - $ref: '#/components/schemas/Element'
-      - $ref: '#/components/schemas/Collection'
-      - $ref: '#/components/schemas/KeyValue'
-    Record:
-      example:
-        columns:
-        - null
-        - null
-      properties:
-        columns:
-          items:
-            $ref: '#/components/schemas/Column'
-          type: array
-      type: object
-    CollectiveResults:
-      example:
-        records:
-        - columns:
-          - null
-          - null
-        - columns:
-          - null
-          - null
-      properties:
-        records:
-          items:
-            $ref: '#/components/schemas/Record'
-          type: array
-      type: object
-    PrimitiveType:
-      properties:
-        primitive_type:
-          enum:
-          - DT_SIGNED_INT32
-          - DT_UNSIGNED_INT32
-          - DT_SIGNED_INT64
-          - DT_UNSIGNED_INT64
-          - DT_BOOL
-          - DT_FLOAT
-          - DT_DOUBLE
-          example: DT_SIGNED_INT32
-          type: string
-      required:
-      - primitive_type
-      type: object
-      x-body-name: primitive_type
-    LongText:
-      properties:
-        long_text:
-          nullable: true
-          type: string
-      required:
-      - long_text
-      type: object
-      x-body-name: long_text
-    FixedChar:
-      properties:
-        char:
-          $ref: '#/components/schemas/FixedChar_char'
-      required:
-      - char
-      type: object
-      x-body-name: fixed_char
-    VarChar:
-      properties:
-        var_char:
-          $ref: '#/components/schemas/VarChar_var_char'
-      required:
-      - var_char
-      type: object
-      x-body-name: var_char
-    StringType:
-      properties:
-        string:
-          $ref: '#/components/schemas/StringType_string'
-      required:
-      - string
-      type: object
-      x-body-name: string_type
-    TimeStampType:
-      properties:
-        timestamp:
-          type: string
-      required:
-      - timestamp
-      type: object
-      x-body-name: time_stamp_type
-    TemporalType:
-      oneOf:
-      - $ref: '#/components/schemas/TimeStampType'
-      type: object
-      x-body-name: temporal_type
-    GSDataType:
-      oneOf:
-      - $ref: '#/components/schemas/PrimitiveType'
-      - $ref: '#/components/schemas/StringType'
-      - $ref: '#/components/schemas/TemporalType'
-      x-body-name: gs_data_type
-    Property:
-      example:
-        name: id
-        value: ""
-      properties:
-        name:
-          example: id
-          type: string
-        value: {}
-      required:
-      - name
-      - value
-      type: object
-      x-body-name: property
-    PropertyArray:
-      example:
-        properties:
-        - name: id
-          value: ""
-        - name: id
-          value: ""
-      properties:
-        properties:
-          items:
-            $ref: '#/components/schemas/Property'
-          type: array
-      required:
-      - properties
-      type: object
-      x-body-name: property_array
-    Parameter:
-      properties:
-        name:
-          example: param1
-          type: string
-        type:
-          $ref: '#/components/schemas/GSDataType'
-      required:
-      - name
-      - type
-      type: object
-      x-body-name: parameter
-    VertexRequest:
-      example:
-        label: person
-        primary_key_value: ""
-        properties:
-          properties:
-          - name: id
-            value: ""
-          - name: id
-            value: ""
-      properties:
-        label:
-          example: person
-          type: string
-        primary_key_value: {}
-        properties:
-          $ref: '#/components/schemas/PropertyArray'
-      required:
-      - label
-      - primary_key_value
-      type: object
-      x-body-name: vertex_request
-    VertexData:
-      example:
-        values:
-        - name: id
-          value: ""
-        - name: id
-          value: ""
-        label: person
-      properties:
-        label:
-          example: person
-          type: string
-        values:
-          items:
-            $ref: '#/components/schemas/Property'
-          type: array
-      required:
-      - label
-      type: object
-      x-body-name: vertex_data
-    EdgeData:
-      example:
-        src_label: person
-        src_primary_key_value: ""
-        dst_label: software
-        edge_label: created
-        dst_primary_key_value: ""
-        properties:
-        - name: id
-          value: ""
-        - name: id
-          value: ""
-      properties:
-        src_label:
-          example: person
-          type: string
-        dst_label:
-          example: software
-          type: string
-        edge_label:
-          example: created
-          type: string
-        src_primary_key_value: {}
-        dst_primary_key_value: {}
-        properties:
-          items:
-            $ref: '#/components/schemas/Property'
-          type: array
-      required:
-      - dst_label
-      - dst_primary_key_value
-      - edge_label
-      - properties
-      - src_label
-      - src_primary_key_value
-      type: object
-      x-body-name: edge_data
-    EdgeRequest:
-      example:
-        src_label: person
-        src_primary_key_value: ""
-        dst_label: software
-        edge_label: created
-        dst_primary_key_value: ""
-        properties:
-        - name: id
-          value: ""
-        - name: id
-          value: ""
-      properties:
-        src_label:
-          example: person
-          type: string
-        dst_label:
-          example: software
-          type: string
-        edge_label:
-          example: created
-          type: string
-        src_primary_key_value: {}
-        dst_primary_key_value: {}
-        properties:
-          items:
-            $ref: '#/components/schemas/Property'
-          type: array
-      required:
-      - dst_label
-      - dst_primary_key_value
-      - edge_label
-      - src_label
-      - src_primary_key_value
-      type: object
-      x-body-name: edge_request
-    QueryRequest:
-      example:
-        query_name: ic1
-        arguments:
-        - type: null
-          value: ""
-        - type: null
-          value: ""
-      properties:
-        query_name:
-          example: ic1
-          type: string
-        arguments:
-          items:
-            $ref: '#/components/schemas/TypedValue'
-          type: array
-      required:
-      - query_name
-      type: object
-      x-body-name: query_request
-    CreateProcedureRequest:
-      example:
-        query: MATCH(a) return COUNT(a);
-        name: query1
-        description: A sample stored procedure
-        type: cpp
-      properties:
-        name:
-          example: query1
-          type: string
-        description:
-          example: A sample stored procedure
-          type: string
-        type:
-          enum:
-          - cpp
-          - cypher
-          type: string
-        query:
-          example: MATCH(a) return COUNT(a);
-          type: string
-      required:
-      - name
-      - query
-      - type
-      type: object
-      x-body-name: create_procedure_request
-    CreateProcedureResponse:
-      example:
-        procedure_id: proc1
-      properties:
-        procedure_id:
-          example: proc1
-          type: string
-      required:
-      - procedure_id
-      type: object
-      x-body-name: create_procedure_response
-    StoredProcedureMeta:
-      allOf:
-      - $ref: '#/components/schemas/CreateProcedureRequest'
-      - properties:
-          id:
-            example: "The unique identifier of procedure, currently is same with name."
-            type: string
-          library:
-            example: /path/to/library
-            type: string
-          params:
-            items:
-              $ref: '#/components/schemas/Parameter'
-            type: array
-          returns:
-            items:
-              $ref: '#/components/schemas/Parameter'
-            type: array
-          enable:
-            example: true
-            type: boolean
-        type: object
-      x-body-name: stored_procedure_meta
-    GetProcedureResponse:
-      allOf:
-      - $ref: '#/components/schemas/StoredProcedureMeta'
-      - properties:
-          bound_graph:
-            type: string
-          runnable:
-            type: boolean
-          creation_time:
-            type: integer
-        type: object
-      x-body-name: get_procedure_response
-    UpdateProcedureRequest:
-      example:
-        description: A sample stored procedure
-      properties:
-        description:
-          example: A sample stored procedure
-          type: string
-      type: object
-      x-body-name: update_procedure_request
-    CreateGraphResponse:
-      example:
-        graph_id: "1"
-      properties:
-        graph_id:
-          example: "1"
-          type: string
-      type: object
-      x-body-name: create_graph_response
-    CreateGraphRequest:
-      example:
-        schema:
-          vertex_types:
-          - null
-          - null
-          edge_types:
-          - null
-          - null
-        stored_procedures:
-        - query: MATCH(a) return COUNT(a);
-          name: query1
-          description: A sample stored procedure
-          type: cpp
-        - query: MATCH(a) return COUNT(a);
-          name: query1
-          description: A sample stored procedure
-          type: cpp
-        name: modern_graph
-        description: A default description
-      properties:
-        name:
-          example: modern_graph
-          type: string
-        description:
-          example: A default description
-          type: string
-        stored_procedures:
-          items:
-            $ref: '#/components/schemas/CreateProcedureRequest'
-          type: array
-        schema:
-          $ref: '#/components/schemas/CreateGraphSchemaRequest'
-      type: object
-      x-body-name: create_graph_request
-    APIResponse:
-      example: Response string
-      type: string
-      x-body-name: api_response
-    GetGraphResponse:
-      example:
-        creation_time: 11223444
-        schema:
-          vertex_types:
-          - null
-          - null
-          edge_types:
-          - null
-          - null
-        stored_procedures:
-        - null
-        - null
-        name: name
-        description: description
-        id: id
-        store_type: mutable_csr
-        data_import_config:
-          loading_config:
-            format:
-              metadata:
-                key: ""
-              type: type
-            import_option: init
-          edge_mappings:
-          - inputs:
-            - inputs
-            - inputs
-            source_vertex_mappings:
-            - column:
-                name: name
-                index: 0
-              property: id
-            - column:
-                name: name
-                index: 0
-              property: id
-            destination_vertex_mappings:
-            - column:
-                name: name
-                index: 0
-              property: id
-            - column:
-                name: name
-                index: 0
-              property: id
-            column_mappings:
-            - column:
-                name: name
-                index: 0
-              property: property
-            - column:
-                name: name
-                index: 0
-              property: property
-            type_triplet:
-              edge: edge
-              source_vertex: source_vertex
-              destination_vertex: destination_vertex
-          - inputs:
-            - inputs
-            - inputs
-            source_vertex_mappings:
-            - column:
-                name: name
-                index: 0
-              property: id
-            - column:
-                name: name
-                index: 0
-              property: id
-            destination_vertex_mappings:
-            - column:
-                name: name
-                index: 0
-              property: id
-            - column:
-                name: name
-                index: 0
-              property: id
-            column_mappings:
-            - column:
-                name: name
-                index: 0
-              property: property
-            - column:
-                name: name
-                index: 0
-              property: property
-            type_triplet:
-              edge: edge
-              source_vertex: source_vertex
-              destination_vertex: destination_vertex
-          graph: graph
-          vertex_mappings:
-          - type_name: type_name
-            inputs:
-            - file:///path/to/person.csv
-            - file:///path/to/person.csv
-            column_mappings:
-            - column:
-                name: name
-                index: 0
-              property: property
-            - column:
-                name: name
-                index: 0
-              property: property
-          - type_name: type_name
-            inputs:
-            - file:///path/to/person.csv
-            - file:///path/to/person.csv
-            column_mappings:
-            - column:
-                name: name
-                index: 0
-              property: property
-            - column:
-                name: name
-                index: 0
-              property: property
-        data_update_time: 11123445
-      properties:
-        id:
-          type: string
-        name:
-          type: string
-        description:
-          type: string
-        store_type:
-          enum:
-          - mutable_csr
-          type: string
-        creation_time:
-          example: 11223444
-          type: integer
-        data_update_time:
-          example: 11123445
-          type: integer
-        stored_procedures:
-          items:
-            $ref: '#/components/schemas/GetProcedureResponse'
-          type: array
-        schema:
-          $ref: '#/components/schemas/GetGraphSchemaResponse'
-        data_import_config:
-          $ref: '#/components/schemas/SchemaMapping'
-      type: object
-      x-body-name: get_graph_response
-    CreateGraphSchemaRequest:
-      example:
-        vertex_types:
-        - null
-        - null
-        edge_types:
-        - null
-        - null
-      properties:
-        vertex_types:
-          items:
-            $ref: '#/components/schemas/CreateVertexType'
-          type: array
-        edge_types:
-          items:
-            $ref: '#/components/schemas/CreateEdgeType'
-          type: array
-      type: object
-      x-body-name: create_graph_schema_request
-    GetGraphSchemaResponse:
-      example:
-        vertex_types:
-        - null
-        - null
-        edge_types:
-        - null
-        - null
-      properties:
-        vertex_types:
-          items:
-            $ref: '#/components/schemas/GetVertexType'
-          type: array
-        edge_types:
-          items:
-            $ref: '#/components/schemas/GetEdgeType'
-          type: array
-      type: object
-      x-body-name: get_graph_schema_response
-    BaseVertexType:
-      properties:
-        type_name:
-          type: string
-        primary_keys:
-          items:
-            type: string
-          type: array
-        x_csr_params:
-          $ref: '#/components/schemas/BaseVertexType_x_csr_params'
-      type: object
-    CreateVertexType:
-      allOf:
-      - $ref: '#/components/schemas/BaseVertexType'
-      - properties:
-          properties:
-            items:
-              $ref: '#/components/schemas/CreatePropertyMeta'
-            type: array
-        type: object
-      x-body-name: create_vertex_type
-    GetVertexType:
-      allOf:
-      - $ref: '#/components/schemas/BaseVertexType'
-      - properties:
-          type_id:
-            format: int32
-            type: integer
-          properties:
-            items:
-              $ref: '#/components/schemas/GetPropertyMeta'
-            type: array
-          description:
-            type: string
-        type: object
-      x-body-name: get_vertex_type
-    BaseEdgeType:
-      properties:
-        type_name:
-          type: string
-        vertex_type_pair_relations:
-          items:
-            $ref: '#/components/schemas/BaseEdgeType_vertex_type_pair_relations_inner'
-          type: array
-      type: object
-    CreateEdgeType:
-      allOf:
-      - $ref: '#/components/schemas/BaseEdgeType'
-      - properties:
-          properties:
-            items:
-              $ref: '#/components/schemas/CreatePropertyMeta'
-            type: array
-        type: object
-      x-body-name: create_edge_type
-    GetEdgeType:
-      allOf:
-      - $ref: '#/components/schemas/BaseEdgeType'
-      - properties:
-          type_id:
-            format: int32
-            type: integer
-          description:
-            type: string
-          properties:
-            items:
-              $ref: '#/components/schemas/GetPropertyMeta'
-            type: array
-        type: object
-      x-body-name: get_edge_type
-    BasePropertyMeta:
-      properties:
-        property_name:
-          type: string
-        property_type:
-          $ref: '#/components/schemas/GSDataType'
-      type: object
-    CreatePropertyMeta:
-      allOf:
-      - $ref: '#/components/schemas/BasePropertyMeta'
-      x-body-name: create_property_meta
-    GetPropertyMeta:
-      allOf:
-      - $ref: '#/components/schemas/BasePropertyMeta'
-      - properties:
-          property_id:
-            format: int32
-            type: integer
-        type: object
-      x-body-name: get_property_meta
-    SchemaMapping:
-      example:
-        loading_config:
-          format:
-            metadata:
-              key: ""
-            type: type
-          import_option: init
-        edge_mappings:
-        - inputs:
-          - inputs
-          - inputs
-          source_vertex_mappings:
-          - column:
-              name: name
-              index: 0
-            property: id
-          - column:
-              name: name
-              index: 0
-            property: id
-          destination_vertex_mappings:
-          - column:
-              name: name
-              index: 0
-            property: id
-          - column:
-              name: name
-              index: 0
-            property: id
-          column_mappings:
-          - column:
-              name: name
-              index: 0
-            property: property
-          - column:
-              name: name
-              index: 0
-            property: property
-          type_triplet:
-            edge: edge
-            source_vertex: source_vertex
-            destination_vertex: destination_vertex
-        - inputs:
-          - inputs
-          - inputs
-          source_vertex_mappings:
-          - column:
-              name: name
-              index: 0
-            property: id
-          - column:
-              name: name
-              index: 0
-            property: id
-          destination_vertex_mappings:
-          - column:
-              name: name
-              index: 0
-            property: id
-          - column:
-              name: name
-              index: 0
-            property: id
-          column_mappings:
-          - column:
-              name: name
-              index: 0
-            property: property
-          - column:
-              name: name
-              index: 0
-            property: property
-          type_triplet:
-            edge: edge
-            source_vertex: source_vertex
-            destination_vertex: destination_vertex
-        graph: graph
-        vertex_mappings:
-        - type_name: type_name
-          inputs:
-          - file:///path/to/person.csv
-          - file:///path/to/person.csv
-          column_mappings:
-          - column:
-              name: name
-              index: 0
-            property: property
-          - column:
-              name: name
-              index: 0
-            property: property
-        - type_name: type_name
-          inputs:
-          - file:///path/to/person.csv
-          - file:///path/to/person.csv
-          column_mappings:
-          - column:
-              name: name
-              index: 0
-            property: property
-          - column:
-              name: name
-              index: 0
-            property: property
-      properties:
-        graph:
-          type: string
-        loading_config:
-          $ref: '#/components/schemas/SchemaMapping_loading_config'
-        vertex_mappings:
-          items:
-            $ref: '#/components/schemas/VertexMapping'
-          type: array
-        edge_mappings:
-          items:
-            $ref: '#/components/schemas/EdgeMapping'
-          type: array
-      type: object
-      x-body-name: schema_mapping
-    VertexMapping:
-      example:
-        type_name: type_name
-        inputs:
-        - file:///path/to/person.csv
-        - file:///path/to/person.csv
-        column_mappings:
-        - column:
-            name: name
-            index: 0
-          property: property
-        - column:
-            name: name
-            index: 0
-          property: property
-      properties:
-        type_name:
-          type: string
-        inputs:
-          items:
-            example: file:///path/to/person.csv
-            type: string
-          type: array
-        column_mappings:
-          items:
-            $ref: '#/components/schemas/ColumnMapping'
-          type: array
-      type: object
-      x-body-name: vertex_mapping
-    EdgeMapping:
-      example:
-        inputs:
-        - inputs
-        - inputs
-        source_vertex_mappings:
-        - column:
-            name: name
-            index: 0
-          property: id
-        - column:
-            name: name
-            index: 0
-          property: id
-        destination_vertex_mappings:
-        - column:
-            name: name
-            index: 0
-          property: id
-        - column:
-            name: name
-            index: 0
-          property: id
-        column_mappings:
-        - column:
-            name: name
-            index: 0
-          property: property
-        - column:
-            name: name
-            index: 0
-          property: property
-        type_triplet:
-          edge: edge
-          source_vertex: source_vertex
-          destination_vertex: destination_vertex
-      properties:
-        type_triplet:
-          $ref: '#/components/schemas/EdgeMapping_type_triplet'
-        inputs:
-          items:
-            type: string
-          type: array
-        source_vertex_mappings:
-          items:
-            $ref: '#/components/schemas/EdgeMapping_source_vertex_mappings_inner'
-          type: array
-        destination_vertex_mappings:
-          items:
-            $ref: '#/components/schemas/EdgeMapping_destination_vertex_mappings_inner'
-          type: array
-        column_mappings:
-          items:
-            $ref: '#/components/schemas/ColumnMapping'
-          type: array
-      type: object
-      x-body-name: edge_mapping
-    ColumnMapping:
-      example:
-        column:
-          name: name
-          index: 0
-        property: property
-      properties:
-        column:
-          $ref: '#/components/schemas/EdgeMapping_source_vertex_mappings_inner_column'
-        property:
-          description: must align with the schema
-          type: string
-      type: object
-      x-body-name: column_mapping
-    StartServiceRequest:
-      example:
-        graph_id: graph_id
-      properties:
-        graph_id:
-          type: string
-      x-body-name: start_service_request
-    ServiceStatus:
-      example:
-        graph_id: graph_id
-        bolt_port: 0
-        hqps_port: 6
-        gremlin_port: 1
-        status: status
-      properties:
-        status:
-          type: string
-        graph_id:
-          type: string
-        bolt_port:
-          format: int32
-          type: integer
-        hqps_port:
-          format: int32
-          type: integer
-        gremlin_port:
-          format: int32
-          type: integer
-      type: object
-      x-body-name: service_status
-    JobResponse:
-      example:
-        job_id: job_id
-      properties:
-        job_id:
-          type: string
-      type: object
-      x-body-name: job_response
-    JobStatus:
-      example:
-        start_time: 0
-        log: log
-        end_time: 6
-        id: id
-        detail:
-          key: ""
-        type: type
-        status: RUNNING
-      properties:
-        id:
-          type: string
-        type:
-          type: string
-        status:
-          enum:
-          - RUNNING
-          - SUCCESS
-          - FAILED
-          - CANCELLED
-          - WAITING
-          type: string
-        start_time:
-          format: int32
-          type: integer
-        end_time:
-          format: int32
-          type: integer
-        log:
-          description: URL or log string
-          type: string
-        detail:
-          additionalProperties: true
-          type: object
-      type: object
-      x-body-name: job_status
-    FixedChar_char:
-      properties:
-        fixed_char:
-          type: integer
-      required:
-      - fixed_char
-      type: object
-    VarChar_var_char:
-      properties:
-        max_length:
-          type: integer
-      required:
-      - max_length
-      type: object
-    StringType_string:
-      oneOf:
-      - $ref: '#/components/schemas/LongText'
-      - $ref: '#/components/schemas/FixedChar'
-      - $ref: '#/components/schemas/VarChar'
-    BaseVertexType_x_csr_params:
-      description: Used for storage optimization
-      properties:
-        max_vertex_num:
-          type: integer
-      type: object
-    BaseEdgeType_vertex_type_pair_relations_inner_x_csr_params:
-      description: Used for storage optimization
-      properties:
-        edge_storage_strategy:
-          enum:
-          - ONLY_IN
-          - ONLY_OUT
-          - BOTH_OUT_IN
-          type: string
-        sort_on_compaction:
-          type: boolean
-      type: object
-    BaseEdgeType_vertex_type_pair_relations_inner:
-      properties:
-        source_vertex:
-          type: string
-        destination_vertex:
-          type: string
-        relation:
-          enum:
-          - MANY_TO_MANY
-          - ONE_TO_MANY
-          - MANY_TO_ONE
-          - ONE_TO_ONE
-          type: string
-        x_csr_params:
-          $ref: '#/components/schemas/BaseEdgeType_vertex_type_pair_relations_inner_x_csr_params'
-      type: object
-    SchemaMapping_loading_config_format:
-      example:
-        metadata:
-          key: ""
-        type: type
-      properties:
-        type:
-          type: string
-        metadata:
-          additionalProperties: true
-          type: object
-      type: object
-    SchemaMapping_loading_config:
-      example:
-        format:
-          metadata:
-            key: ""
-          type: type
-        import_option: init
-      properties:
-        import_option:
-          enum:
-          - init
-          - overwrite
-          type: string
-        format:
-          $ref: '#/components/schemas/SchemaMapping_loading_config_format'
-      type: object
-    EdgeMapping_type_triplet:
-      description: "source label -> [edge label] -> destination label"
-      example:
-        edge: edge
-        source_vertex: source_vertex
-        destination_vertex: destination_vertex
-      properties:
-        edge:
-          type: string
-        source_vertex:
-          type: string
-        destination_vertex:
-          type: string
-      type: object
-    EdgeMapping_source_vertex_mappings_inner_column:
-      example:
-        name: name
-        index: 0
-      properties:
-        index:
-          format: int32
-          type: integer
-        name:
-          type: string
-      type: object
-    EdgeMapping_source_vertex_mappings_inner:
-      description: Mapping column to the primary key of source vertex
-      example:
-        column:
-          name: name
-          index: 0
-        property: id
-      properties:
-        column:
-          $ref: '#/components/schemas/EdgeMapping_source_vertex_mappings_inner_column'
-        property:
-          example: id
-          type: string
-      type: object
-    EdgeMapping_destination_vertex_mappings_inner:
-      description: Mapping column to the primary key of destination vertex
-      example:
-        column:
-          name: name
-          index: 0
-        property: id
-      properties:
-        column:
-          $ref: '#/components/schemas/EdgeMapping_source_vertex_mappings_inner_column'
-        property:
-          example: id
-          type: string
-      type: object
-
diff --git a/flex/openapi/openapi_interactive.yaml b/flex/openapi/openapi_interactive.yaml
index 81dac7968eee..f7d2c6ddf186 100644
--- a/flex/openapi/openapi_interactive.yaml
+++ b/flex/openapi/openapi_interactive.yaml
@@ -1475,8 +1475,6 @@ components:
       x-body-name: schema_mapping
       type: object
       properties:
-        graph:
-          type: string
         loading_config:
           type: object
           properties:
@@ -1598,8 +1596,8 @@ components:
       properties:
         status:
           type: string
-        graph_id:
-          type: string
+        graph:
+          $ref: '#/components/schemas/GetGraphResponse'
         bolt_port:
           type: integer
           format: int32


Test patch:
diff --git a/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java b/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
index 2fb3ae4ae3c7..417675d0eb05 100644
--- a/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
+++ b/flex/interactive/sdk/java/src/test/java/com/alibaba/graphscope/interactive/client/DriverTest.java
@@ -141,7 +141,6 @@ public void test0CreateGraph() {
     @Order(2)
     public void test1BulkLoading() {
         SchemaMapping schemaMapping = new SchemaMapping();
-        schemaMapping.setGraph(graphId);
         {
             SchemaMappingLoadingConfig loadingConfig = new SchemaMappingLoadingConfig();
             loadingConfig.setImportOption(SchemaMappingLoadingConfig.ImportOptionEnum.INIT);
diff --git a/flex/interactive/sdk/python/test/test_driver.py b/flex/interactive/sdk/python/test/test_driver.py
index 95efbaf6d2bc..f1e7163604a2 100644
--- a/flex/interactive/sdk/python/test/test_driver.py
+++ b/flex/interactive/sdk/python/test/test_driver.py
@@ -151,7 +151,6 @@ def bulkLoading(self):
         )
         print("test bulk loading: ", self._graph_id)
         schema_mapping = SchemaMapping(
-            graph=self._graph_id,
             loading_config=SchemaMappingLoadingConfig(
                 import_option="init",
                 format=SchemaMappingLoadingConfigFormat(type="csv"),
diff --git a/flex/tests/hqps/admin_http_test.cc b/flex/tests/hqps/admin_http_test.cc
index db7dfb8931e4..cf8173b0f7fc 100644
--- a/flex/tests/hqps/admin_http_test.cc
+++ b/flex/tests/hqps/admin_http_test.cc
@@ -427,7 +427,6 @@ int main(int argc, char** argv) {
                      procedure_paths);
   LOG(INFO) << "run procedure tests done";
   run_get_node_status(cli);
-  test_delete_graph(cli, graph_id);
   LOG(INFO) << "test delete graph done";
   return 0;
 }
\ No newline at end of file
diff --git a/flex/tests/hqps/hqps_sdk_test.sh b/flex/tests/hqps/hqps_sdk_test.sh
index 8aca2aacc4bb..0885ad109a72 100644
--- a/flex/tests/hqps/hqps_sdk_test.sh
+++ b/flex/tests/hqps/hqps_sdk_test.sh
@@ -83,7 +83,7 @@ start_engine_service(){
 
     echo "Start engine service with command: ${cmd}"
     eval ${cmd} 
-    sleep 5
+    sleep 10
     #check interactive_server is running, if not, exit
     ps -ef | grep "interactive_server" | grep -v grep