doyensec / GQLSpection

GQLSpection - parses GraphQL introspection schema and generates possible queries
Apache License 2.0
70 stars 10 forks source link

Parsing mistake #19

Closed execveat closed 1 year ago

execveat commented 1 year ago
query X {
  a(b:c) {
    d e f g h {
      i
    }
  }
}
execveat commented 1 year ago

Not always though. Hm, hard to nail down.

execveat commented 1 year ago

Ok, figured it out. The problem lies in pretty_print_graphql:

In [10]: print(gqlspection.utils.pretty_print_graphql("""
    ...: query a {
    ...:     b() {
    ...:         c
    ...:     }
    ...:     d
    ...:     e
    ...: """))
query a {
  b() {
    c 
  }
  d e