Mirror: The spec-compliant minimum of client-side GraphQL.

hotfix: Fix aliased field name followed by arguments

Changed files
+7 -1
.changeset
src
+5
.changeset/rotten-lies-camp.md
··· 1 + --- 2 + '@0no-co/graphql.web': patch 3 + --- 4 + 5 + Fix aliased field name followed by arguments causing parsing error.
+1 -1
src/__tests__/parser.test.ts
··· 177 177 expect(() => parse('{ field(name: null }')).toThrow(); 178 178 expect(() => parse('{ field(name: % )')).toThrow(); 179 179 180 - expect(parse('{ field(name: null) }').definitions[0]).toMatchObject({ 180 + expect(parse('{ alias: field (name: null) }').definitions[0]).toMatchObject({ 181 181 kind: Kind.OPERATION_DEFINITION, 182 182 selectionSet: { 183 183 kind: Kind.SELECTION_SET,
+1
src/parser.ts
··· 361 361 ignored(); 362 362 _alias = match; 363 363 if ((match = advance(nameRe)) == null) throw error('Field'); 364 + ignored(); 364 365 } 365 366 const _arguments = arguments_(false); 366 367 ignored();