Fix span expansion when operation name is null

This commit is contained in:
Tobe O 2018-08-03 23:21:09 -04:00
parent da150d8a6a
commit e4d5693ace

View file

@ -66,7 +66,8 @@ class Parser {
..directives.addAll(dirs);
else
throw new SyntaxError(
'Expected selection set in fragment definition.', NAME.span);
'Expected selection set in fragment definition.',
NAME?.span ?? TYPE.span);
} else
return null;
}