Skip to content

Commit f6b063a

Browse files
committed
fixes, fix readme
1 parent 2fc5394 commit f6b063a

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,34 @@ cargo add graphql-tools
3434
- [ ] Validation rules (in-progress)
3535

3636
> If you have an idea / missing feature, feel free to open an issue / start a GitHub discussion!
37+
38+
#### Validation Rules
39+
40+
> This comparison is based on `graphql-js` refernece implementation.
41+
42+
- [x] ExecutableDefinitions (not actually needed)
43+
- [x] UniqueOperationNames
44+
- [x] LoneAnonymousOperation
45+
- [x] SingleFieldSubscriptions
46+
- [x] KnownTypeNames
47+
- [x] FragmentsOnCompositeTypes
48+
- [x] VariablesAreInputTypes
49+
- [x] LeafFieldSelections
50+
- [x] FieldsOnCorrectType
51+
- [x] UniqueFragmentNames
52+
- [x] KnownFragmentNames
53+
- [x] NoUnusedFragments
54+
- [ ] PossibleFragmentSpreads
55+
- [ ] NoFragmentCycles
56+
- [ ] UniqueVariableNames
57+
- [ ] NoUndefinedVariables
58+
- [ ] NoUnusedVariables
59+
- [ ] KnownDirectives
60+
- [ ] UniqueDirectivesPerLocation
61+
- [ ] KnownArgumentNames
62+
- [ ] UniqueArgumentNames
63+
- [ ] ValuesOfCorrectType
64+
- [ ] ProvidedRequiredArguments
65+
- [ ] VariablesInAllowedPosition
66+
- [x] OverlappingFieldsCanBeMerged
67+
- [ ] UniqueInputFieldNames

src/validation/rules/defaults.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ use super::{
99
pub fn default_rules_validation_plan() -> ValidationPlan {
1010
let mut plan = ValidationPlan { rules: vec![] };
1111

12+
plan.add_rule(Box::new(UniqueOperationNames {}));
1213
plan.add_rule(Box::new(LoneAnonymousOperation {}));
14+
plan.add_rule(Box::new(SingleFieldSubscriptions {}));
1315
plan.add_rule(Box::new(KnownTypeNames {}));
14-
plan.add_rule(Box::new(FieldsOnCorrectType {}));
15-
plan.add_rule(Box::new(KnownFragmentNames {}));
1616
plan.add_rule(Box::new(FragmentsOnCompositeTypes {}));
17-
plan.add_rule(Box::new(OverlappingFieldsCanBeMerged {}));
18-
plan.add_rule(Box::new(NoUnusedFragments {}));
17+
plan.add_rule(Box::new(VariablesAreInputTypes {}));
1918
plan.add_rule(Box::new(LeafFieldSelections {}));
20-
plan.add_rule(Box::new(UniqueOperationNames {}));
19+
plan.add_rule(Box::new(FieldsOnCorrectType {}));
2120
plan.add_rule(Box::new(UniqueFragmentNames {}));
22-
plan.add_rule(Box::new(SingleFieldSubscriptions {}));
23-
plan.add_rule(Box::new(VariablesAreInputTypes {}));
21+
plan.add_rule(Box::new(KnownFragmentNames {}));
22+
plan.add_rule(Box::new(NoUnusedFragments {}));
23+
plan.add_rule(Box::new(OverlappingFieldsCanBeMerged {}));
2424

2525
plan
2626
}

0 commit comments

Comments
 (0)