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

Fix silent codegen errors on syntax errors #1899

Merged
merged 6 commits into from
Jun 3, 2020

Conversation

JakeDawkins
Copy link
Contributor

resolves #1897

During document parsing, syntax errors are silently
added to the document, but errors are never thrown.

This PR checks at the command-level for these errors
and if they exist, prints them to the user.

I didn't want to change at the document setup level, because
I have a feeling the silent erroring was intention for the sake
of the operation registry or something. So I added in an error
where it was immediately causing an issue, in the client
codegen command.

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

During document parsing, syntax errors are silently
added to the document, but errors are never thrown.

This PR checks at the _command-level_ for these errors
and if they exist, prints them to the user.

I didn't want to change at the document setup level, because
I have a feeling the silent erroring was intention for the sake
of the operation registry or something. So I added in an error
where it was immediately causing an issue, in the client
codegen command.
@apieceofbart
Copy link

@JakeDawkins what's stopping you from merging that? Do you need help?

@JakeDawkins
Copy link
Contributor Author

Sorry for the hold-up @apieceofbart, it's been a while since I've had the time to even look at this 😅

After making a quick second-pass, I think this is safe to merge through

@JakeDawkins JakeDawkins merged commit ea1e0f4 into master Jun 3, 2020
@JakeDawkins JakeDawkins deleted the jake/codegen-silent-syntax-errors branch June 3, 2020 17:34
@apieceofbart
Copy link

Thank you!

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

Successfully merging this pull request may close these issues.

Missing closing brace in GQL input does not emit error
2 participants