graphql-hive / graphql-hive/envelop
sentry plugin does not report ScalarType errors for resolved values
- Dominant language
- No language data
- Stars
- 827
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
## Breakdown
These errors thrown within graphql scalar types `serialize` function are unreported but should IMHO as this indicates something wrong within the GraphQL resolvers.

However, it is currently hard to catch these due to how we detect "unexpected" errors.
Any `GraphQLError` that has an `originalError` property that is not a `GraphQLError` is considered an unexpected error.
Any `GraphQLError` that has an `originalError` property which is a `GraphQLError` is considered an expected error.
This feels a bit inconsistent with how errors are asserted in other places. E.g. a resolver field non-`null` check will raise an `Error` instead of a `GraphQLError`.
## Possible solutions for the problem
1. Talk with graphql-js maintainers and convince them to throw `Error` instead of `GraphQLError` within the scalar functions.
2. Add a way of wrapping/manipulating the schema for adding additional information to the error objects
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.