You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable error stack trace visibility in the dev console for development (and potentially in logs for production).
Motivation
When devs make a coding mistake in a directive, the only information given is the error message, both in graphQL playground
and the terminal output
Impossible to tell in which file or even line of code the error happened with that information. Because i'd just refactored a transformer directive the day before i had a lucky hunch this error was thrown there because resolvedValue i was trying to access was already null for a given query.
Hunches are good and sometimes helpful – but i'd argue that a good stack trace is much more helpful in the first place 😉
Detailed proposal
This is about the API side and shouldn't be a breaking change of any sorts.
For starters, root cause visibility needs to be the default in development env. I'm agnostic about how this is configured in production, but i guess it should fall in the lines of current logging configuration.
Are you interested in working on this?
I'm interested in working on this
The text was updated successfully, but these errors were encountered:
Philzen
changed the title
[RFC]: Enable debugging of directives by showing stack trace in dev server console
[RFC]: Show stack trace of errors in dev server console
Jun 29, 2022
My main project i'm working on is on 1.5.1, but i have a sandbox project based on 2.0.0 – and in the the latter i get full-on stack traces, preceded by a 🚨 GraphQLError Info object.
Summary
Enable error stack trace visibility in the dev console for development (and potentially in logs for production).
Motivation
When devs make a coding mistake in a directive, the only information given is the error message, both in graphQL playground
and the terminal output
Impossible to tell in which file or even line of code the error happened with that information. Because i'd just refactored a transformer directive the day before i had a lucky hunch this error was thrown there because resolvedValue i was trying to access was already null for a given query.
Hunches are good and sometimes helpful – but i'd argue that a good stack trace is much more helpful in the first place 😉
Detailed proposal
This is about the API side and shouldn't be a breaking change of any sorts.
For starters, root cause visibility needs to be the default in development env. I'm agnostic about how this is configured in production, but i guess it should fall in the lines of current logging configuration.
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: