Flatten GraphQL for consumption in graphing Libs?

I know this question is somehow OT here but anyhow … all of the graphing libs D3.js, Sigma.js, Alchemy, js.cytoscape expect data more or less in the form

  { group: "nodes", data: { id: "n0" }},
  { group: "nodes", data: { id: "n1" }},
  { group: "edges", data: { id: "e0", source: "n0", target: "n1" } }

What possibilities are there to convert hierarchical DGraph GraphQL output to such flat representation?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.