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

feat(graphql_parser): parse enum extension #3044

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

vohoanglong0107
Copy link
Contributor

Summary

Parse GraphQL enum extensions (link). Once this is completed, we will only have input object extensions (link) remaining before the GraphQL parser is ready for benchmarking.

Test Plan

All tests should pass

@github-actions github-actions bot added the A-Tooling Area: internal tools label Jun 3, 2024
Copy link

codspeed-hq bot commented Jun 3, 2024

CodSpeed Performance Report

Merging #3044 will not alter performance

Comparing vohoanglong0107:feat-graphql-enum-extension (842fb45) with vohoanglong0107:feat-graphql-enum-extension (d1de19c)

Summary

✅ 92 untouched benchmarks

@vohoanglong0107 vohoanglong0107 marked this pull request as ready for review June 3, 2024 04:45
Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

let m = p.start();

p.bump(T![extend]);
p.bump(T![enum]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
p.bump(T![enum]);
p.expect(T![enum]);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is truly necessary, as this parsing rule should only be called in one place (here), and we must have already checked for the presence of both tokens before advancing. Correct me if you think otherwise.

Copy link
Contributor

@arendjr arendjr Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it’s not a blocker, but it’s good practice for the parser functions to validate their preconditions instead of assuming to be called correctly. It wouldn’t change anything functionally now, but it makes the contract more explicit and brings some extra robustness in the face of future changes to the parser.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to merge once we address Arend suggestion (even in another PR if that's okay)

@ematipico ematipico merged commit 4ce2144 into biomejs:main Jun 5, 2024
12 checks passed
@vohoanglong0107 vohoanglong0107 deleted the feat-graphql-enum-extension branch June 5, 2024 10:04
@Conaclos Conaclos added the A-Changelog Area: changelog label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Tooling Area: internal tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants