I currently develop software for Shopify and use it’s GraphQL API heavily. It’s a complex beast and hoped to find a way to visualise the connections of it.
It kept my good old 2015 MBP busy for about 5 Minutes, created a huge PNG with 80MB. I could zoom in, but all the connections are too close together or covering each other to be of any help.
I had been looking for an interactive GraphViz viewer, which can handle such big diagrams. But everything I tried either just froze or threw an exception after a while. I tried:
Qt Visual Graph Editor - qvge: It threw an exception
graphql-voyager - it just stayed blank
EclipseGraphviz - I could not even install the Eclipse Plugin because of missing dependencies. I guess Eclipse is left in the dust.
Is there anything out there capable visualising such a big schema?
Ideally with the capability to manually interactively rearrange the elements to clean up overlapping connections.
Try rendering to SVG instead of PNG. For a large graph, vector graphics (svg) produce a more readable/manageable result. graphqlviz ShopifySchema.json | dot -Tsvg -o ShopifySchema.svg
Then use your favorite web browser as a viewer. Control-o seems to be the “open a file” command for most/all browsers.
Also curious how large laaaaarge is. Please run this: graphqlviz ShopifySchema.json | gc
The first number in the output is the count of nodes, the second number is the count of edges.
Have you looked at Ideatree.net? Interactive, zoom-able, etc. The “Prettify” functions are powered by graphviz under the covers. The size of graph handled is basically limited by how much memory you have, the speed of your browser, etc. We tested it up to 1k nodes on a fully-connected graph (how many edges would that be?). Disclaimer: I’m one of the developers.
I am using the approach of exporting to svg, and then adding ineractivity in the diagram using javascript. When clicking on a node it will highlight all edges connecting to that node in the diagram.
The feature to produce svg with postprocessing is available in the latest release of Excel to Graphviz, which you can find here: Excel to Graphviz
xdot.py supports searching and highlighting of nodes and edge labels, fast navigation and zoom etc. It installs on macOS via brew install xdot and Debian/Ubuntu with sudo apt install xdot (although they may ship a rather outdated version of xdot).
For those in the future, having just used a 130B dot file (45,000 nodes, 400,000 edges), you can use “Gephi”.
Import your dot files. In the lower left of Gephi in the “Layout” pane choose the “ForceAtlas 2” layout. This will allow you to check “Prevent Overlap” [I believe in doing so you need to turn off “Approximate Repulsion”]