INNER CODE UNIT · JavaScript
rootPath
sheerun/graphqlviz · index.js:485
var rootPath = walkBFS.call(this, schema, (v, k, p) => {
if (k === '__schema') {
return p
}
})
if (!rootPath) {
throw new Error('Cannot find "__schema" object')
}
var root = _.get(schema, rootPath)
var graphRoot = getGraphRoot.call(this, root)
var q = graphRoot.q
var types = graphRoot.types
// walk the graph & build up nodes & edges
var current
var entities = {}