sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Given a GraphQL source, parses it into a Document.
     * Throws GraphQLError if a syntax error is encountered.
     */
Given a GraphQL source, parses it into a Document.
Throws GraphQLError if a syntax error is encountered.
Given a GraphQL source parses it into a Document . Throws GraphQLError if a syntax error is encountered .
function parse(source, options) {
      var sourceObj = typeof source === 'string' ? new Source(source) : source;
      if (!(sourceObj instanceof Source)) {
        throw new TypeError("Must provide Source. Received: ".concat(inspect(sourceObj)));
      }
      var lexer = createLexer(sourceObj, options || {});
      return parseDocument(lexer);
    }
function parse ( source , options ) { var sourceObj = typeof source === 'string' ? new Source ( source ) : source ; if ( ! ( sourceObj instanceof Source ) ) { throw new TypeError ( "Must provide Source. Received: " . concat ( inspect ( sourceObj ) ) ) ; } var lexer = createLexer ( sourceObj , options || { } ) ; return parseDocument ( lexer ) ; }
Given a GraphQL source, parses it into a Document.
Given a GraphQL source parses it into a Document .