Skip to content

[1.8.12] Validation error regressions #2030

@swalkinshaw

Description

@swalkinshaw

It looks like the new error bubbling feature introduced in #2013 (and in 1.8.12) causes some regressions in validation errors even when its not enabled (I tried enabling/disabling to be sure).

Here's an example:

1.8.10:

=> {:errors=>
  [{:message=>"Argument 'input' on Field 'productCreate' has an invalid value. Expected type 'ProductInput!'.",
    :locations=>[{:line=>2, :column=>3}],
    :fields=>["mutation M", "productCreate", "input"]}]}

1.8.12 error_bubbling = false

{:errors=>
  [{:message=>"Argument 'foo' on InputObject 'ProductInput' is required. Expected type FooInput!", :locations=>[{:line=>2, :column=>52}], :fields=>["mutation M", "productCreate", "input", "foo"]},
   {:message=>"Argument 'bar' on InputObject 'ProductInput' is required. Expected type BarInput!",
    :locations=>[{:line=>2, :column=>52}],
    :fields=>["mutation M", "productCreate", "input", "bar"]}]}

1.8.12 error_bubbling = true

{:errors=>
  [{:message=>"Argument 'input' on Field 'productCreate' has an invalid value. Expected type 'ProductInput!'.",
    :locations=>[{:line=>2, :column=>3}],
    :fields=>["mutation M", "productCreate", "input"]},
  [{:message=>"Argument 'foo' on InputObject 'ProductInput' is required. Expected type FooInput!", :locations=>[{:line=>2, :column=>52}], :fields=>["mutation M", "productCreate", "input", "foo"]},
   {:message=>"Argument 'bar' on InputObject 'ProductInput' is required. Expected type BarInput!",
    :locations=>[{:line=>2, :column=>52}],
    :fields=>["mutation M", "productCreate", "input", "bar"]}]}

cc @modosc as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions