sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
     * that type.
     * Throws GraphQLError if a syntax error is encountered.
     *
     * This is useful within tools that operate upon GraphQL Types directly and
     * in isolation of complete GraphQL documents.
     *
     * Consider providing the results to the utility function: typeFromAST().
     */
Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
that type.
Throws GraphQLError if a syntax error is encountered.

This is useful within tools that operate upon GraphQL Types directly and
in isolation of complete GraphQL documents.

Consider providing the results to the utility function: typeFromAST().
Given a string containing a GraphQL Type ( ex . ` [ Int! ] ` ) parse the AST for that type . Throws GraphQLError if a syntax error is encountered . This is useful within tools that operate upon GraphQL Types directly and in isolation of complete GraphQL documents . Consider providing the results to the utility function : typeFromAST () .
function parseType(source, options) {
      var sourceObj = typeof source === 'string' ? new Source(source) : source;
      var lexer = createLexer(sourceObj, options || {});
      expect(lexer, TokenKind.SOF);
      var type = parseTypeReference(lexer);
      expect(lexer, TokenKind.EOF);
      return type;
    }
function parseType ( source , options ) { var sourceObj = typeof source === 'string' ? new Source ( source ) : source ; var lexer = createLexer ( sourceObj , options || { } ) ; expect ( lexer , TokenKind . SOF ) ; var type = parseTypeReference ( lexer ) ; expect ( lexer , TokenKind . EOF ) ; return type ; }
Given a string containing a GraphQL Type (ex.
Given a string containing a GraphQL Type ( ex .