Skip to content

Commit c055457

Browse files
committed
added more rules
1 parent 72fed6f commit c055457

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

graph/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ http = "0.2.3"
2121
fail = { version = "0.5", features = ["failpoints"] }
2222
futures = "0.1.21"
2323
graphql-parser = "0.4.0"
24-
graphql-tools = "0.0.5"
24+
graphql-tools = "0.0.6"
2525
lazy_static = "1.4.0"
2626
mockall = "0.8.3"
2727
num-bigint = { version = "^0.2.6", features = ["serde"] }

graphql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ crossbeam = "0.8"
88
futures01 = { package="futures", version="0.1.29" }
99
graph = { path = "../graph" }
1010
graphql-parser = "0.4.0"
11-
graphql-tools = "0.0.5"
11+
graphql-tools = "0.0.6"
1212
indexmap = "1.7"
1313
Inflector = "0.11.3"
1414
lazy_static = "1.2.0"

graphql/src/runner.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use graph::{
2222
prelude::QueryStore,
2323
};
2424
use graphql_tools::validation::rules::{
25-
FragmentsOnCompositeTypes, LoneAnonymousOperation, OverlappingFieldsCanBeMerged,
25+
FragmentsOnCompositeTypes, KnownFragmentNamesRule, LoneAnonymousOperation, NoUnusedFragments,
26+
OverlappingFieldsCanBeMerged,
2627
};
2728
use graphql_tools::validation::validate::{validate, ValidationPlan};
2829

@@ -145,6 +146,8 @@ where
145146
graphql_validation_plan.add_rule(Box::new(LoneAnonymousOperation {}));
146147
graphql_validation_plan.add_rule(Box::new(FragmentsOnCompositeTypes {}));
147148
graphql_validation_plan.add_rule(Box::new(OverlappingFieldsCanBeMerged {}));
149+
graphql_validation_plan.add_rule(Box::new(KnownFragmentNamesRule {}));
150+
graphql_validation_plan.add_rule(Box::new(NoUnusedFragments {}));
148151

149152
GraphQlRunner {
150153
logger,

0 commit comments

Comments
 (0)