New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mis-parsing GraphQL identifiers when it starts with keywords (fix #20) #21
Mis-parsing GraphQL identifiers when it starts with keywords (fix #20) #21
Conversation
@ecthiender can you review? Once this has been passed I'll be able to reference from graphql-engine. |
test/primitiveColumns.hs
Outdated
@@ -0,0 +1,45 @@ | |||
{-# LANGUAGE OverloadedStrings #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name of the file should be PrimitiveColumns
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think we should call it something else. It is not really related to columns, but primitive values of GraphQL.
package.yaml
Outdated
@@ -78,6 +78,7 @@ benchmarks: | |||
tests: | |||
graphql-parser-test: | |||
main: Spec.hs | |||
other-modules: PrimitiveColumns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the hspec format, I don't think we have to include them like this. Do you think this is necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some minor comments. Otherwise looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…a/graphql-parser-hs into sordina/lyndon/issue-20-column-misparsing
Related Issues:
Ensures that primitive identifiers end rather than appear as a prefix of a broader identifier, ala
nullColumnTwo
.Unit-tests added to ensure that the issue does not re-occur.
Currently, the implementation may be inefficient due to lookup of char-class:
This could also be wrong!
Ideally lexing and parsing will be separated and lexing can be compared to the syntax spec more easily.