neodash
neodash copied to clipboard
#Vulcan 235/(Graph report type)Show customised message or render string response returned from cypher query
Problem: The issue which we are trying to address is when user searches for the data which is not exists in our db. The graph report type returns a generic message "Query returned no data" message or an empty canvas. So, to address this we have created custom component which is similar to single value report.
Solution The custom component will check the response of the cypher query. If it return valid node data then it prints the graph or else if it is of type string then the value is printed by the custom component. Please refer the below example cypher query.
MATCH (n:Movie {title:'SomeRandomMovieOrEmptyString'}) WITH collect(n) as nodes UNWIND (CASE nodes WHEN [] THEN [NULL] ELSE nodes END) AS m RETURN coalesce(m, "No results")
The result from this query is used and displayed to user. In this way, we could show the users a customized message instead of generic message.
Screenshots
NOTICE: The program was tested solely for our own use cases, which might differ from yours.
Author Info: Monish [email protected] on behalf of Mercedes-Benz Research and Development India https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Hi @m-o-n-i-s-h , thank you for helping the project? One question: isn't this clashing with the Override Query return no data option inside the advanced options of each report?
@alfredorubin96 True in a way but we are trying to render a whole new component like below. This implementation works only for Graph.
The existing implementation works for all the reports.
NOTICE: The program was tested solely for our own use cases, which might differ from yours.
Author Info: Monish [email protected] on behalf of Mercedes-Benz Research and Development India https://github.com/mercedes-benz/mercedes-benz-foss/blob/master/PROVIDER_INFORMATION.md
