Skip to content

Conversation

swolchok
Copy link
Contributor

Resolves issue #58. There is one special case because fragments named on may be defined according to the current specification (fragment on on SomeType { someField }), but may not be referenced.

(If you try to reference your fragment named on, it's at best a syntax error, as in { ...on }, which is the start of an inline fragment definition that doesn't have a type.)

@leebyron
Copy link
Contributor

Since 8ae5bd7 just landed, maybe you want to revisit this slightly to not include "on" as a viable fragment name? If you rebase, this test should no longer pass

@swolchok swolchok force-pushed the test-non-keywords branch from bb3061b to ba7d739 Compare July 16, 2015 15:47
@swolchok
Copy link
Contributor Author

If you rebase, this test should no longer pass

It currently passes; on is a legal query name, type name, field name, directive name, argument name, and variable name, and the test is careful not to use it as a fragment name.

@swolchok swolchok force-pushed the test-non-keywords branch from ba7d739 to fa70ff8 Compare July 28, 2015 16:50
@leebyron
Copy link
Contributor

It currently passes; on is a legal query name, type name, field name, directive name, argument name, and variable name, and the test is careful not to use it as a fragment name.

Nice work

leebyron added a commit that referenced this pull request Jul 28, 2015
Add parser tests for accepting non-keywords
@leebyron leebyron merged commit 264be16 into master Jul 28, 2015
@leebyron leebyron deleted the test-non-keywords branch July 28, 2015 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants