Skip to content

Draft: Add model level validation errors to organization graphql output

Doug Stull requested to merge 429784-add-validation-errors into master

What does this MR do and why?

Add model level validation errors to organization graphql output

  • feedback for the user as per #429784 (closed)
  • it looks like there are a few ways to ensure rails validation errors make it back to the output in graphql as seen in 1,2,3.
    • The approach I took here was more on the unstructured output way, but if desired we could break it up by attribute or by message(many messages). It all depends on what is desired.
    • we don't have a standard way in GitLab it seems to bubble the rails validation errors(not referring to graphql validation errors), but this seemed like the most straightforward way.

Changelog: changed

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-12-08_at_12.29.01_PM Screenshot_2023-12-08_at_12.25.35_PM

How to set up and validate locally

  1. In GDK, go to the graphql explorer as seen in screenshots.
  2. Execute the mutation 2 times(to get the non unique error).
  3. Compare to master behavior as desired.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #429784 (closed)

Edited by Doug Stull

Merge request reports