diff --git a/README.md b/README.md
index d0b755bf1..dca1d6d62 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Tanka GraphQL library
## Features
* Execute queries, mutations and subscriptions
-* Validation (Dirty port from graphql-dotnet). Validation is the slowest part of the execution and needs to be redone.
+* Validation (new implementation in v0.3.0)
* SignalR hub for streaming queries, mutations and subscriptions
* ApolloLink for the provided SignalR hub
diff --git a/docs/1-execution/01-validation.md b/docs/1-execution/01-validation.md
index 26f39a38f..0b22a482b 100644
--- a/docs/1-execution/01-validation.md
+++ b/docs/1-execution/01-validation.md
@@ -5,14 +5,22 @@
### Execution
-[{tanka.graphql.tests.validation.ValidatorFacts.ValidateAsync}]
+[{tanka.graphql.tests.validation.ValidatorFacts.Validate}]
### Rules
-5.1.1 Executable Definitions
+Execution
+
+[{tanka.graphql.validation.ExecutionRules.All}]
+
+Rules not implemented
+[{tanka.graphql.tests.validation.ValidatorFacts.Rule_532_Field_Selection_Merging}]
+[{tanka.graphql.tests.validation.ValidatorFacts.Rule_572_DirectivesAreInValidLocations_valid1}]
+[{tanka.graphql.tests.validation.ValidatorFacts.Rule_583_AllVariableUsesDefined}]
+[{tanka.graphql.tests.validation.ValidatorFacts.Rule_584_AllVariablesUsed_valid1}]
+[{tanka.graphql.tests.validation.ValidatorFacts.Rule_585_AllVariableUsagesAreAllowed_valid1}]
+
-[{tanka.graphql.tests.validation.ValidatorFacts.Rule_511_Executable_Definitions}]
->TODO: Rest of the rules. Issue [#16](https://github.com/pekkah/tanka-graphql/issues/16)
diff --git a/docs/_template.html b/docs/_template.html
index 973f1adc7..4eef87e14 100644
--- a/docs/_template.html
+++ b/docs/_template.html
@@ -61,7 +61,7 @@
Tanka GraphQL
diff --git a/src/graphql.benchmarks/Benchmarks.cs b/src/graphql.benchmarks/Benchmarks.cs
index 2a0f64058..4c1025935 100644
--- a/src/graphql.benchmarks/Benchmarks.cs
+++ b/src/graphql.benchmarks/Benchmarks.cs
@@ -20,6 +20,7 @@ public class Benchmarks
private ISchema _schema;
private GraphQLDocument _mutation;
private GraphQLDocument _subscription;
+ private IEnumerable _defaultRulesMap;
[GlobalSetup]
public async Task Setup()
@@ -28,8 +29,9 @@ public async Task Setup()
_query = Utils.InitializeQuery();
_mutation = Utils.InitializeMutation();
_subscription = Utils.InitializeSubscription();
+ _defaultRulesMap = ExecutionRules.All;
}
-
+
[Benchmark]
public async Task Query_with_defaults()
{
@@ -135,11 +137,12 @@ public async Task Subscribe_without_validation_and_get_value()
var value = result.Source.Receive();
AssertResult(value.Errors);
}
-
+
[Benchmark]
- public async Task Validate_query_with_defaults()
+ public void Validate_query_with_defaults()
{
- var result = await Validator.ValidateAsync(
+ var result = Validator.Validate(
+ _defaultRulesMap,
_schema,
_query);
diff --git a/src/graphql/Error.cs b/src/graphql/Error.cs
index 163543406..6e7cfd604 100644
--- a/src/graphql/Error.cs
+++ b/src/graphql/Error.cs
@@ -14,7 +14,7 @@ public Error(string message)
public string Message { get; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
- public List Locations { get; set; }
+ public List Locations { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List