MichalLytek / MichalLytek/type-graphql

Better runtime error handling

Open
#158 0 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement :new:
Dominant language
TypeScript
Stars
8.1k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

I like the idea presented in graphql-errors library, where runtime errors are captured and replaced with UUID to prevent data leaks:
https://github.com/kadirahq/graphql-errors

Direct integration with this library might not be a good idea as its outdated but I think that the source code is simple and I can reimplement it in TypeGraphQL with better API that would allow to enable/disable it per type or field and pass custom mask function in decorators.
https://github.com/kadirahq/graphql-errors/blob/master/lib/index.js

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced graphql-errors library's lib/index.js and compare its runtime error masking approach with TypeGraphQL's current error flow. Define the decorator-level API, per-type or per-field behavior, and custom mask function before implementing and documenting the completed feature.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.