Repository: kestra-io/kestra
Issue: Blueprint graph does not load
Labels: bug

### Expected Behavior

Blueprint graph does not load when you don't have the plugin : 
![image](https://github.com/kestra-io/kestra/assets/37600690/c520a7f3-1713-4cc7-9d5d-5402554fc387)
![image](https://github.com/kestra-io/kestra/assets/37600690/c5452f56-2e06-4ce8-8a8a-a6d5f049738b)


### Actual Behaviour

_No response_

### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.10.0-SNAPSHOT

### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/webserver/src/main/java/io/kestra/webserver/controllers/BlueprintController.java b/webserver/src/main/java/io/kestra/webserver/controllers/BlueprintController.java
index 8c57325cb8..b4bb57b6c3 100644
--- a/webserver/src/main/java/io/kestra/webserver/controllers/BlueprintController.java
+++ b/webserver/src/main/java/io/kestra/webserver/controllers/BlueprintController.java
@@ -27,6 +27,7 @@
 import java.net.URISyntaxException;
 import java.time.Instant;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 
 @Validated
@@ -64,11 +65,11 @@ public String blueprintFlow(
     @ExecuteOn(TaskExecutors.IO)
     @Get(value = "{id}/graph")
     @Operation(tags = {"blueprints"}, summary = "Get a blueprint graph")
-    public FlowGraph blueprintGraph(
+    public Map<String, Object> blueprintGraph(
         @Parameter(description = "The blueprint id") String id,
         HttpRequest<?> httpRequest
     ) throws URISyntaxException {
-        return fastForwardToKestraApi(httpRequest, "/v1/blueprints/" + id + "/graph", Argument.of(FlowGraph.class));
+        return fastForwardToKestraApi(httpRequest, "/v1/blueprints/" + id + "/graph", Argument.mapOf(String.class, Object.class));
     }
 
     @ExecuteOn(TaskExecutors.IO)


Test patch:
diff --git a/webserver/src/test/java/io/kestra/webserver/controllers/BlueprintControllerTest.java b/webserver/src/test/java/io/kestra/webserver/controllers/BlueprintControllerTest.java
index 7d1399e562..d772420214 100644
--- a/webserver/src/test/java/io/kestra/webserver/controllers/BlueprintControllerTest.java
+++ b/webserver/src/test/java/io/kestra/webserver/controllers/BlueprintControllerTest.java
@@ -16,6 +16,7 @@
 
 import java.time.Instant;
 import java.util.List;
+import java.util.Map;
 
 import static com.github.tomakehurst.wiremock.client.WireMock.*;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -84,15 +85,18 @@ void blueprintGraph(WireMockRuntimeInfo wmRuntimeInfo) {
                 .withBodyFile("blueprint-graph.json"))
         );
 
-        FlowGraph graph = client.toBlocking().retrieve(
+        Map<String, Object> graph = client.toBlocking().retrieve(
             HttpRequest.GET("/api/v1/blueprints/community/id_1/graph"),
-            FlowGraph.class
+            Argument.mapOf(String.class, Object.class)
         );
 
-        assertThat(graph.getNodes().size(), is(12));
-        assertThat(graph.getNodes().stream().filter(abstractGraph -> abstractGraph.getUid().equals("3mTDtNoUxYIFaQtgjEg28_root")).count(), is(1L));
-        assertThat(graph.getEdges().size(), is(16));
-        assertThat(graph.getClusters().size(), is(1));
+        List<Map<String, Object>> nodes = (List<Map<String, Object>>) graph.get("nodes");
+        List<Map<String, Object>> edges = (List<Map<String, Object>>) graph.get("edges");
+        List<Map<String, Object>> clusters = (List<Map<String, Object>>) graph.get("clusters");
+        assertThat(nodes.size(), is(12));
+        assertThat(nodes.stream().filter(abstractGraph -> abstractGraph.get("uid").equals("3mTDtNoUxYIFaQtgjEg28_root")).count(), is(1L));
+        assertThat(edges.size(), is(16));
+        assertThat(clusters.size(), is(1));
 
         WireMock wireMock = wmRuntimeInfo.getWireMock();
         wireMock.verifyThat(getRequestedFor(urlEqualTo("/v1/blueprints/id_1/graph")));
diff --git a/webserver/src/test/resources/__files/blueprint-graph.json b/webserver/src/test/resources/__files/blueprint-graph.json
index c2438f5f34..8aedd6c72d 100644
--- a/webserver/src/test/resources/__files/blueprint-graph.json
+++ b/webserver/src/test/resources/__files/blueprint-graph.json
@@ -25,7 +25,7 @@
         "tasks": [
           {
             "id": "t1",
-            "type": "io.kestra.core.tasks.scripts.Bash",
+            "type": "io.kestra.core.tasks.scripts.UnknownTask",
             "commands": [
               "echo \"{{task.id}} > $(date +\"%T.%N\")\""
             ]