Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

make TypeCondition optional in InlineFragments #9

Closed
wants to merge 1 commit into from

Conversation

asiandrummer
Copy link
Contributor

Addresses #8. Instead of checking for on keyword (which is optional) to determine whether the rule is InlineFragment or FragmentSpread, do a negative lookahead for on keyword and match any words to determine FragmentSpread. This allows TypeCondition (on {Type}) to be optional in inline fragments.

There are false positives in tests that did not catch this - will address in the later PR.

@leebyron
Copy link
Contributor

leebyron commented Feb 2, 2016

This just got merged in 5b8ba38

@leebyron leebyron closed this Feb 2, 2016
@leebyron
Copy link
Contributor

leebyron commented Feb 2, 2016

I made a minor edit before landing to shorten the condition check from looking for a whole name to just looking for the first character in a name.

This was a nice solution, great work

@leebyron leebyron deleted the inline-fragments-optional branch August 25, 2016 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants