graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph

Home Page:https://graphql-kit.com/graphql-voyager/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support prebuilt SVG graph

namoscato opened this issue · comments

Thanks for maintaining this neat project, @IvanGoncharov!

I'm running into issues rendering a very large schema; presumably the Graphviz WebAssembly build is too much for the browser to handle:

Uncaught RangeError: Maximum call stack size exceeded
    at 002a5d36

Would you be open to supporting a mode in which the SVG graph is prebuilt?

namoscato:prebuild prototypes what this might look like:

  • expose npm script to pre-generate the SVG via a locally installed Graphviz (this takes ~2.5min for my schema)
  • extend Voyager.introspection with another variant that includes SVG contents (arguably an awkward interface in its current state; open to suggestions)

At any rate, if you are open to this feature, I would be happy to collaborate with you on the implementation!

Relates to #63, #129, #204, #377