Skip to content

Error's path on validation errors #166

Description

@l3x4

Question

For validation errors it will be very helpful to specify the field where the validation failed (to highlight it on the form for example).

Currently the situation looks like this:

  1. The path contains just the mutation name, for example for the empty email it's like so: "path": ["userSignUp"]. Would be great to have "path": ["userSignUp", "email"]
  2. The attempt to build the error manually with rescue_from ActiveModel::ValidationError { ... } in the schema doesn't seem to be catching this.

What's the proper way to do it?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions