INNER CODE UNIT · JavaScript

processInputType

sheerun/graphqlviz · index.js:175

function processInputType (type) {
  var fields = _.map(type.inputFields, analyzeField.bind(this))
  return {
    name: type.name,
    isInputType: true,
    fields: fields
  }
}

// walks the object in level-order
// invokes iter at each node
// if iter returns truthy, breaks & returns the value
// assumes no cycles
function walkBFS (obj, iter) {
  var q = _.map(_.keys(obj), k => {
    return { key: k, path: '["' + k + '"]' }
  })

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…