Report error when a project has multiple definitions for an operation instead of crashing #275
+33
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #252
The resulting behavior is an error in the console that can the be recovered instead of crashing the server up to 5 times before vs code requires a full reload to resume operations.
In my case, devs sometimes copy/paste an operation (it's wrong I know, but it happens). GraphQL Codegen doesn't alert on it because the 2 operations are exactly the same, no harm no foul.
But having this extension crash without any meaningful error message makes it really for us to fix our stuff.
I tried a production build and replaced it in my extension folder. This is the result I'm seeing.