apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
566 stars 45 forks source link

Regression in parser 0.7.3: empty object values no longer parse #744

Closed goto-bus-stop closed 10 months ago

goto-bus-stop commented 10 months ago

Description

Describe the issue that you're seeing.

Steps to reproduce

Assume a schema with an input object:

input Input {
  optional: Boolean
}
type Query {
  field(arg: Input): Int
}

And a query like this with an empty object:

{
  field(arg: {})
}

Expected result

Should parse without errors.

Actual result

Error: syntax error: expected Object Value
   ╭─[/dev/fd/11:8:15]
   │
 8 │   field(arg: {})
   │               ┬
   │               ╰── expected Object Value
───╯

Environment