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

Refactor literal parser using AST instead of regex #22

Merged
merged 3 commits into from Aug 25, 2022

Conversation

Chnapy
Copy link
Owner

@Chnapy Chnapy commented Aug 18, 2022

Regex gives false-positive matchs like comments, big strings etc.

Use of @graphql-tools/graphql-tag-pluck for literals extract. This lib is used by @graphql-codegen so given result is reliable and gives reduce amount of code to maintain.

Since it has impact on performance, 2 first commits gives a self-made solution, more limited and less-safe but more performant. Consider revert to this solution if performance become an issue.

fix #20

@Chnapy Chnapy marked this pull request as ready for review August 25, 2022 21:59
@Chnapy Chnapy merged commit 0dd8982 into master Aug 25, 2022
@Chnapy Chnapy deleted the refactor-literal-parser branch August 25, 2022 22:00
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.

Ignore comments
1 participant