Support prebuilt SVG graph

Author: namoscatoCreated Dec 29, 2023Updated Dec 29, 2023

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 https://github.com/graphql-kit/graphql-voyager/issues/63, https://github.com/graphql-kit/graphql-voyager/issues/129, https://github.com/graphql-kit/graphql-voyager/issues/204, https://github.com/graphql-kit/graphql-voyager/issues/377

Source: APIs-guru/graphql-voyager