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

Extract check for unique operation types into separate rule #995

Merged
merged 7 commits into from
Nov 4, 2021

Conversation

vhenzl
Copy link
Contributor

@vhenzl vhenzl commented Oct 30, 2021

Introduces UniqueOperationTypes validation rule.

Corresponding change in the reference implementation: graphql/graphql-js@9b7a8af

@codecov
Copy link

codecov bot commented Oct 30, 2021

Codecov Report

Merging #995 (e03e5e6) into master (816ae2a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #995      +/-   ##
============================================
+ Coverage     94.47%   94.49%   +0.02%     
  Complexity       50       50              
============================================
  Files           119      120       +1     
  Lines          9617     9635      +18     
============================================
+ Hits           9086     9105      +19     
+ Misses          531      530       -1     
Impacted Files Coverage Δ
src/Utils/BuildSchema.php 100.00% <ø> (ø)
src/Utils/SchemaExtender.php 99.33% <100.00%> (+0.31%) ⬆️
src/Validator/DocumentValidator.php 83.47% <100.00%> (+0.14%) ⬆️
src/Validator/Rules/UniqueOperationTypes.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 816ae2a...e03e5e6. Read the comment docs.

Copy link
Collaborator

@spawnia spawnia left a comment

Choose a reason for hiding this comment

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

Looks solid overall, can be micro-optimized a bit

src/Validator/Rules/UniqueOperationTypes.php Show resolved Hide resolved
src/Validator/Rules/UniqueOperationTypes.php Outdated Show resolved Hide resolved
src/Validator/Rules/UniqueOperationTypes.php Outdated Show resolved Hide resolved
tests/Validator/UniqueOperationTypesTest.php Outdated Show resolved Hide resolved
@spawnia
Copy link
Collaborator

spawnia commented Nov 3, 2021

Can you add a CHANGELOG entry to mention the introduction of a new rule?

@vhenzl
Copy link
Contributor Author

vhenzl commented Nov 4, 2021

@spawnia It's ready.

@spawnia spawnia merged commit b5f0a8b into webonyx:master Nov 4, 2021
@vhenzl vhenzl deleted the rule-unique-operation-types branch November 22, 2021 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants