sample-proxies/graphql-sample/graphql-proxy/apiproxy/resources/jsc/graphql.jsc.js
/**
     * Corresponds to both FragmentSpread and InlineFragment in the spec.
     *
     * FragmentSpread : ... FragmentName Directives?
     *
     * InlineFragment : ... TypeCondition? Directives? SelectionSet
     */
Corresponds to both FragmentSpread and InlineFragment in the spec.


Corresponds to both FragmentSpread and InlineFragment in the spec .
function parseFragment(lexer) {
      var start = lexer.token;
      expect(lexer, TokenKind.SPREAD);
      var hasTypeCondition = skipKeyword(lexer, 'on');
      if (!hasTypeCondition && peek(lexer, TokenKind.NAME)) {
        return {
          kind: Kind.FRAGMENT_SPREAD,
          name: parseFragmentName(lexer),
          directives: parseDirectives(lexer, false),
          loc: loc(lexer, start)
        };
      }
      return {
        kind: Kind.INLINE_FRAGMENT,
        typeCondition: hasTypeCondition ? parseNamedType(lexer) : undefined,
        directives: parseDirectives(lexer, false),
        selectionSet: parseSelectionSet(lexer),
        loc: loc(lexer, start)
      };
    }
function parseFragment ( lexer ) { var start = lexer . token ; expect ( lexer , TokenKind . SPREAD ) ; var hasTypeCondition = skipKeyword ( lexer , 'on' ) ; if ( ! hasTypeCondition && peek ( lexer , TokenKind . NAME ) ) { return { kind : Kind . FRAGMENT_SPREAD , name : parseFragmentName ( lexer ) , directives : parseDirectives ( lexer , false ) , loc : loc ( lexer , start ) } ; } return { kind : Kind . INLINE_FRAGMENT , typeCondition : hasTypeCondition ? parseNamedType ( lexer ) : undefined , directives : parseDirectives ( lexer , false ) , selectionSet : parseSelectionSet ( lexer ) , loc : loc ( lexer , start ) } ; }
Corresponds to both FragmentSpread and InlineFragment in the spec.
Corresponds to both FragmentSpread and InlineFragment in the spec .