-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
There is a bug that prevents a document such as
input B {
b: [B!]!
}
from parsing.
Note the difference between:
λ length <$> parseOnly (many1 inputValueDefinition) "b: [B!]! x: B"
Right 1
λ length <$> parseOnly (many1 inputValueDefinition) "b: [B!] x: B"
Right 2
And similarly for
λ length <$> parseOnly (many1 fieldDefinition) "b: [B!] b: B"
Right 2
λ length <$> parseOnly (many1 fieldDefinition) "b: [B!]! b: B"
Right 1
Related to this I want to ask about the definition of NonNullType
. Wouldn't it make more sense to define NonNullType
to be:
newtype NonNullType = NonNullType GType
Of course this will permit parsing something like A!!!
- but I believe it would simplify some of the code and help fix the bug in the parser. One challenge with that approach, though, is that parsing a type declaration will then require a look-ahead. Does the declaration end with an exclamation mark or not.
Metadata
Metadata
Assignees
Labels
No labels