Skip to content
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

Crashes with escaped quotes #16

Open
barucAlmaguer opened this issue Mar 9, 2023 · 1 comment
Open

Crashes with escaped quotes #16

barucAlmaguer opened this issue Mar 9, 2023 · 1 comment

Comments

@barucAlmaguer
Copy link

The parser crashes when I pass a query like this one:

{
  queues(filter: {name: "MOVE_LOTS"}) {
    name
    jobs(
      filter: {
        input: {contains: "{\"toResource\": \"UNCASTING_1\"}"}
      }
      orderBy: {desc: ID},
      limit: 10
    ) {
      id
      insertedAt
      queue {
        id
        name
      }
      jobStatus
      input
      context
      output
    }
  }
}

the line #7 fails with this stack trace:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/graphql/parser.py", line 36, in parse
    return self.yacc.parse(input=input, lexer=lexer, **kwargs)
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/ply/yacc.py", line 333, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/ply/yacc.py", line 1201, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/ply/yacc.py", line 192, in call_errorfunc
    r = errorfunc(token)
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/graphql/parser.py", line 647, in p_error
    self.raise_syntax_error(
  File "/Users/baruc/.local/share/virtualenvs/pygqlc-8iu9ltOc/lib/python3.10/site-packages/graphql/parser.py", line 660, in raise_syntax_error
    raise SyntaxError(
graphql.exceptions.SyntaxError: Line 7: Syntax error at ': '
@barucAlmaguer
Copy link
Author

but it's valid graphQL, the query is a valid one that I have used without problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant