sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Render a helpful description of the location of the error in the GraphQL
     * Source document.
     */
Render a helpful description of the location of the error in the GraphQL
Source document.
Render a helpful description of the location of the error in the GraphQL Source document .
function highlightSourceAtLocation(source, location) {
      var firstLineColumnOffset = source.locationOffset.column - 1;
      var body = whitespace(firstLineColumnOffset) + source.body;
      var lineIndex = location.line - 1;
      var lineOffset = source.locationOffset.line - 1;
      var lineNum = location.line + lineOffset;
      var columnOffset = location.line === 1 ? firstLineColumnOffset : 0;
      var columnNum = location.column + columnOffset;
      var lines = body.split(/\r\n|[\n\r]/g);
      return "".concat(source.name, " (").concat(lineNum, ":").concat(columnNum, ")\n") + printPrefixedLines([
      ["".concat(lineNum - 1, ": "), lines[lineIndex - 1]], ["".concat(lineNum, ": "), lines[lineIndex]], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1, ": "), lines[lineIndex + 1]]]);
    }
function highlightSourceAtLocation ( source , location ) { var firstLineColumnOffset = source . locationOffset . column - 1 ; var body = whitespace ( firstLineColumnOffset ) + source . body ; var lineIndex = location . line - 1 ; var lineOffset = source . locationOffset . line - 1 ; var lineNum = location . line + lineOffset ; var columnOffset = location . line === 1 ? firstLineColumnOffset : 0 ; var columnNum = location . column + columnOffset ; var lines = body . split ( / \r\n|[\n\r] / g ) ; return "" . concat ( source . name , " (" ) . concat ( lineNum , ":" ) . concat ( columnNum , ")\n" ) + printPrefixedLines ( [ [ "" . concat ( lineNum - 1 , ": " ) , lines [ lineIndex - 1 ] ] , [ "" . concat ( lineNum , ": " ) , lines [ lineIndex ] ] , [ '' , whitespace ( columnNum - 1 ) + '^' ] , [ "" . concat ( lineNum + 1 , ": " ) , lines [ lineIndex + 1 ] ] ] ) ; }
Render a helpful description of the location of the error in the GraphQL
 Source document.
Render a helpful description of the location of the error in the GraphQL Source document .
// Lines specified like this: ["prefix", "string"],