Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve debugging process #216

Open
armetiz opened this issue Sep 12, 2018 · 1 comment
Open

Improve debugging process #216

armetiz opened this issue Sep 12, 2018 · 1 comment

Comments

@armetiz
Copy link
Contributor

armetiz commented Sep 12, 2018

Hi there.

When error occurred, the debugging process is not really easy.

Example : Cannot return null for non-nullable field 'name'.

With more than 10 types with a name field and more than 1M records in our database, it's not really easy to target the faulty value.

What I suggest is to use PSR\Logger within some class and add debugging information using debug log level.

What do you think about?

Regards;

@Jalle19
Copy link
Collaborator

Jalle19 commented Oct 14, 2019

The most correct solution would be to make the error response spec compliant and add locations to the response, that way it's easy to see which field triggered the error.

Reference: https://graphql.github.io/graphql-spec/June2018/#sec-Errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants