-
Notifications
You must be signed in to change notification settings - Fork 2.8k
console: display line number that error originated from in GraphQL editor (close #4849) #4942
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
Conversation
|
Beep boop! 🤖 Hey @tanvibhakta, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. Stay awesome! 😎 |
|
Review app for commit be7e1d2 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit 5068a88 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
beerose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! This looks great 😉
Left one small comment.
console/src/components/Services/Actions/Common/components/TypeDefinitionEditor.js
Outdated
Show resolved
Hide resolved
displays line number for the first error encountered in the custom types editor
|
Review app for commit 7ee907c deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
tirumaraiselvan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog approved
|
Review app for commit b583bd8 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Hi @tanvibhakta, would you mind doing the same thing for Action Definition editor? |
|
Review app for commit 337360e deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
console/src/components/Services/Actions/Common/components/GraphQLEditor.tsx
Outdated
Show resolved
Hide resolved
|
Review app for commit 812beeb deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit 0f8b107 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit fe1b0a7 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit 7a38bb2 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit a02ff80 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app for commit ac04237 deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Deploy preview for hasura-docs ready! Built with commit 7735586 |
|
Review app for commit d44b03b deployed to Heroku: https://hge-ci-pull-4942.herokuapp.com |
|
Review app https://hge-ci-pull-4942.herokuapp.com is deleted |
|
Beep boop! 🤖 Awesome work @tanvibhakta! All of us at Hasura ❤️ what you did. Thanks again 🤗 |
display line number for the first error encountered in the custom types editor
Changelog
CHANGELOG.mdis updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-requiredlabel.Affected components
Solution and Design
The error object available here is an object of type GraphQLError. It contains the location of the origin of the error within itself.
Steps to test and verify
console > Actions tab >
Custom Typesbutton on the left hand side -> define a custom type in the editor. Where previously an error used to show up, it now shows up with the line number the error is caught on as well.Limitations, known bugs & workarounds
The editor displays the first error message encountered, and therefore the line number displayed will be for that error.
Related issues
#4849