Skip to content

Commit

Permalink
retrieve node from database async
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 21, 2024
1 parent 6561ec1 commit 45c30e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/io/cryostat/graphql/RootNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import io.cryostat.discovery.DiscoveryNode;

import io.smallrye.mutiny.Uni;
import org.eclipse.microprofile.graphql.Description;
import org.eclipse.microprofile.graphql.GraphQLApi;
import org.eclipse.microprofile.graphql.Query;
Expand All @@ -26,7 +27,7 @@ public class RootNode {

@Query("rootNode")
@Description("Get the root target discovery node")
public DiscoveryNode getRootNode() {
return DiscoveryNode.getUniverse();
public Uni<DiscoveryNode> getRootNode() {
return Uni.createFrom().item(DiscoveryNode::getUniverse);
}
}

0 comments on commit 45c30e6

Please sign in to comment.