This repository has been archived by the owner on Aug 20, 2020. It is now read-only.
Return empty map for empty doc (instead of error) #64
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.
Graphql can't parse empty documents (e.g. from js files with no
gql
tags); return an empty OutputMap in these cases instead of failing. Example:# File with no `gql` tags: yarn run persistgraphql --js --extension=js src/components/App.js
leads to
This makes it impossible for me to recursively analyze a directory (e.g.
src/
) because there are undoubtedly going to be some .js files in that directory without anygql
tags.Note: This is a similar error to #48 and #20 but seemingly a different cause. This was also merged recently but seemingly didn't fix the issue in all cases: #48.