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

Better error handling #302

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0cc813a
Switch to use `visit` from `graphql` to verify operations
jerelmiller Jun 9, 2023
463fa8b
Add vfile and vfile-reporter packages
jerelmiller Jun 9, 2023
0896c02
Use vfile and vfile-reporter to output all errors during generation
jerelmiller Jun 9, 2023
60dfa30
Better error messages
jerelmiller Jun 9, 2023
bafddf2
Show bi-directional errors when there are duplicates
jerelmiller Jun 9, 2023
9e9bc08
Stop traversal when navigating definition nodes
jerelmiller Jun 9, 2023
0d1e52c
Better message for anonymous operations
jerelmiller Jun 9, 2023
c2a9baa
Extract helper to function
jerelmiller Jun 9, 2023
f56a257
Simplify how paths are pulled
jerelmiller Jun 9, 2023
90b0281
Rename helper function
jerelmiller Jun 9, 2023
e586ae1
Simplify conditional statement
jerelmiller Jun 9, 2023
a51de07
Extract validation to function and swap order of error call
jerelmiller Jun 9, 2023
8de2236
Minor refactoring
jerelmiller Jun 9, 2023
d84270d
Add some helpers for defining error messages
jerelmiller Jun 9, 2023
a8fa706
Stop traversing when hitting an anonymous operation
jerelmiller Jun 9, 2023
0b0c9b3
Add unique errors while traversing AST
jerelmiller Jun 9, 2023
a7820d7
Rename anonymous error
jerelmiller Jun 9, 2023
5af1031
Remove need to return vfile message
jerelmiller Jun 9, 2023
ddf1366
Minor tweaks to error message
jerelmiller Jun 10, 2023
8cf74fe
Parse .gql the same as .graphql files
jerelmiller Jun 10, 2023
8255c3e
Add changeset
jerelmiller Jun 10, 2023
2efbe2c
Use screaming snake case for constants
jerelmiller Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/weak-monkeys-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@apollo/generate-persisted-query-manifest": patch
---

Provides more robust error handling and reporting.

* Collect all errors while generating manifest and report them together at once. Previously it would exit as soon as an error was encountered, even if there were multiple issues.
* Update the error reporting format to make it much easier to determine which file contains the error.
Loading