graphql-api
graphql-api copied to clipboard
Fix issue with inability to parse mandatory types
Prior to this commit:
λ parseWith (pure mempty) type_ "[B!]!"
Done "!" (TypeList ...)
With this commit we now have:
λ parseWith (pure mempty) type_ "[B!]!"
Done "" (TypeNonNull ...)
The important thing to note here is that previous "[B!]!" was parsed as a list type (not a non-null type), but all the input was not consumed as expected. This means that whatever parser comes after would start by looking at the exclamation point, which belongs to the type.
This aims to close https://github.com/haskell-graphql/graphql-api/issues/221
parseWith (pure mempty)
-- BTW -- was a trick I came up with to inspect how much input attoparsec consumes. See http://hackage.haskell.org/package/attoparsec-0.13.2.2/docs/Data-Attoparsec-Text.html#v:parseWith
Thanks! Can you change this to the value 1364? I believe that will fix the test.
Thanks! Can you change this to the value 1364? I believe that will fix the test.
Ah cool! Thanks for providing the fix, I had just glossed over it. I will update this PR later.