rmosolgo / rmosolgo/graphql-ruby
Add a way to customize ValidationFailedError
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.4k
- Forks
- 1.4k
- Avg merge
- 23h 19m
- Merged PRs (30d)
- 28
Description
Currently, the gem raises ValidationFailedErrors when argument validation fails:
But there's no way to customize that before it reaches an end user.
- Could it be
rescue_fromed and re-raised? - Could it be customizable somehow? Maybe
context.schema::ValidationFailedError?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/graphql/schema/validator.rb around line 147, where ValidationFailedError is raised. Investigate how validation errors reach end users and whether the existing rescue_from or context.schema mechanisms apply. Done would mean a documented, tested way to customize or handle this error before it reaches the end user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, ruby
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100