Skip to content

Commit

Permalink
Fixed typo (ChilliCream#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Jan 16, 2019
1 parent 4ff3e54 commit a36600d
Show file tree
Hide file tree
Showing 48 changed files with 387 additions and 387 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Moreover, we bound a resolver to the field that returns a fixed value _world_. A
In order to serve up queries against our schema lets make it executable:

```csharp
var executer = schema.MakeExecutable();
var executor = schema.MakeExecutable();
```

Now that the schema is setup and executable we can serve up a query against it.
Expand All @@ -100,7 +100,7 @@ Now that the schema is setup and executable we can serve up a query against it.
// {
// data: { hello: "world" }
// }
Console.WriteLine(executer.Execute("{ hello }"));
Console.WriteLine(executor.Execute("{ hello }"));
```

This runs a query fetching the one field defined. The graphql function will first ensure the query is syntactically and semantically valid before executing it, reporting errors otherwise.
Expand All @@ -120,7 +120,7 @@ This runs a query fetching the one field defined. The graphql function will firs
// }
// ]
// }
Console.WriteLine(executer.Execute("{ foo }"));
Console.WriteLine(executor.Execute("{ foo }"));
```

In order to set up a GraphQL HTTP endpoint, Hot Chocolate comes with an ASP.net core middleware.
Expand Down
40 changes: 20 additions & 20 deletions src/Core/Benchmark.Tests/Execution/QueryExecuterBenchmarkBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ namespace HotChocolate.Benchmark.Tests.Execution

[CoreJob]
[RPlotExporter, MemoryDiagnoser]
public class QueryExecuterBenchmarkBase
public class QueryExecutorBenchmarkBase
{
private readonly Schema _schema;
private readonly IQueryExecuter _queryExecuter;
private readonly IQueryExecutor _queryExecutor;

public QueryExecuterBenchmarkBase(int cacheSize)
public QueryExecutorBenchmarkBase(int cacheSize)
{
_schema = SchemaFactory.Create();
_queryExecuter = QueryExecutionBuilder.New()
_queryExecutor = QueryExecutionBuilder.New()
.UseDefaultPipeline()
.AddQueryCache(cacheSize)
.Build(_schema);
Expand All @@ -38,7 +38,7 @@ public async Task<IExecutionResult> GraphQLOrgFieldExample()
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -54,7 +54,7 @@ public async Task<IExecutionResult> GraphQLOrgFieldArgumentExample1()
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -70,7 +70,7 @@ public async Task<IExecutionResult> GraphQLOrgFieldArgumentExample2()
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -88,7 +88,7 @@ public async Task<IExecutionResult> GraphQLOrgAliasExample()
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -114,7 +114,7 @@ fragment comparisonFields on Character {
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -132,7 +132,7 @@ query HeroNameAndFriends {
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -156,7 +156,7 @@ query HeroNameAndFriends($episode: Episode) {
{ "episode", new EnumValueNode("JEDI") }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -174,7 +174,7 @@ query HeroNameAndFriends($episode: Episode = JEDI) {
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand All @@ -198,7 +198,7 @@ friends @include(if: $withFriends) {
{ "withFriends", new BooleanValueNode(false) }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -222,7 +222,7 @@ friends @include(if: $withFriends) {
{ "withFriends", new BooleanValueNode(true) }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -246,7 +246,7 @@ friends @skip(if: $withFriends) {
{ "withFriends", new BooleanValueNode(false) }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -270,7 +270,7 @@ friends @skip(if: $withFriends) {
{ "withFriends", new BooleanValueNode(true) }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -295,7 +295,7 @@ mutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {
new StringValueNode("This is a great movie!"))) }
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -321,7 +321,7 @@ ... on Human {
{ "ep", new EnumValueNode("JEDI") },
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -347,7 +347,7 @@ ... on Human {
{ "ep", new EnumValueNode("EMPIRE") },
};

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query) { VariableValues = variables },
CancellationToken.None);
}
Expand All @@ -374,7 +374,7 @@ ... on Starship {
}
}";

return await _queryExecuter.ExecuteAsync(
return await _queryExecutor.ExecuteAsync(
new QueryRequest(query),
CancellationToken.None);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Benchmark.Tests/Execution/QueryExecuterBenchmarks.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace HotChocolate.Benchmark.Tests.Execution
{
public class QueryExecuterBenchmarks
: QueryExecuterBenchmarkBase
public class QueryExecutorBenchmarks
: QueryExecutorBenchmarkBase
{
public QueryExecuterBenchmarks()
public QueryExecutorBenchmarks()
: base(0)
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace HotChocolate.Benchmark.Tests.Execution
{
public class QueryExecuterWithCacheBenchmarks
: QueryExecuterBenchmarkBase
public class QueryExecutorWithCacheBenchmarks
: QueryExecutorBenchmarkBase
{
public QueryExecuterWithCacheBenchmarks()
public QueryExecutorWithCacheBenchmarks()
: base(100)
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Benchmark.Tests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ static void Main(string[] args)
{
BenchmarkRunner.Run<ParserBenchmarks>();
BenchmarkRunner.Run<LexerBenchmarks>();
BenchmarkRunner.Run<QueryExecuterWithCacheBenchmarks>();
BenchmarkRunner.Run<QueryExecuterBenchmarks>();
BenchmarkRunner.Run<QueryExecutorWithCacheBenchmarks>();
BenchmarkRunner.Run<QueryExecutorBenchmarks>();
BenchmarkRunner.Run<TimestampBenchmarks>();
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/Core/Core.Tests/Execution/Errors/ErrorBehaviourTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ public async Task RootTypeNotDefined()
var schema = Schema.Create(
"type Query { foo: String }",
c => c.Use(next => context => Task.CompletedTask));
IQueryExecuter executer = schema.MakeExecutable();
IQueryExecutor executor = schema.MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
result.Snapshot();
Expand All @@ -258,10 +258,10 @@ public async Task RootFieldNotDefined()
var schema = Schema.Create(
"type Mutation { bar: String }",
c => c.Use(next => context => Task.CompletedTask));
IQueryExecuter executer = schema.MakeExecutable();
IQueryExecutor executor = schema.MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
result.Snapshot();
Expand All @@ -271,14 +271,14 @@ private async Task<IExecutionResult> ExecuteQuery(
string query,
Action errorHandled)
{
IQueryExecuter queryExecuter = CreateSchema().MakeExecutable(
IQueryExecutor queryExecutor = CreateSchema().MakeExecutable(
b => b.UseDefaultPipeline().AddErrorFilter((error, ex) =>
{
errorHandled();
return error;
}));

return await queryExecuter.ExecuteAsync(query);
return await queryExecutor.ExecuteAsync(query);
}

private ISchema CreateSchema()
Expand Down
16 changes: 8 additions & 8 deletions src/Core/Core.Tests/Execution/Errors/ErrorHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public async Task AddFuncErrorFilter()
IncludeExceptionDetails = false
};

IQueryExecuter executer = schema.MakeExecutable(builder =>
IQueryExecutor executor = schema.MakeExecutable(builder =>
builder.UseDefaultPipeline(options)
.AddErrorFilter((error, exception) =>
error.WithCode("Foo123")));

// act
IExecutionResult result = await executer.ExecuteAsync("{ foo }");
IExecutionResult result = await executor.ExecuteAsync("{ foo }");

// assert
result.Snapshot();
Expand Down Expand Up @@ -65,7 +65,7 @@ public async Task FilterOnlyNullRefExceptions()
ExecutionTimeout = TimeSpan.FromMinutes(10)
};

IQueryExecuter executer = schema.MakeExecutable(builder =>
IQueryExecutor executor = schema.MakeExecutable(builder =>
builder.UseDefaultPipeline(options)
.AddErrorFilter((error, exception) =>
{
Expand All @@ -78,7 +78,7 @@ public async Task FilterOnlyNullRefExceptions()

// act
IExecutionResult result =
await executer.ExecuteAsync("{ foo bar }");
await executor.ExecuteAsync("{ foo bar }");

// assert
result.Snapshot();
Expand All @@ -100,12 +100,12 @@ public async Task AddClassErrorFilter()
IncludeExceptionDetails = false
};

IQueryExecuter executer = schema.MakeExecutable(builder =>
IQueryExecutor executor = schema.MakeExecutable(builder =>
builder.UseDefaultPipeline(options)
.AddErrorFilter<DummyErrorFilter>());

// act
IExecutionResult result = await executer.ExecuteAsync("{ foo }");
IExecutionResult result = await executor.ExecuteAsync("{ foo }");

// assert
result.Snapshot();
Expand All @@ -127,12 +127,12 @@ public async Task AddClassErrorFilterWithFactory()
IncludeExceptionDetails = false
};

IQueryExecuter executer = schema.MakeExecutable(builder =>
IQueryExecutor executor = schema.MakeExecutable(builder =>
builder.UseDefaultPipeline(options)
.AddErrorFilter(s => new DummyErrorFilter()));

// act
IExecutionResult result = await executer.ExecuteAsync("{ foo }");
IExecutionResult result = await executor.ExecuteAsync("{ foo }");

// assert
result.Snapshot();
Expand Down
20 changes: 10 additions & 10 deletions src/Core/Core.Tests/Execution/IntrospectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public async Task TypeNameIntrospectionOnQuery()
{
// arrange
string query = "{ __typename }";
IQueryExecuter executer = CreateSchema().MakeExecutable();
IQueryExecutor executor = CreateSchema().MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
Assert.Empty(result.Errors);
Expand All @@ -27,10 +27,10 @@ public async Task TypeNameIntrospectionNotOnQuery()
{
// arrange
string query = "{ b { __typename } }";
IQueryExecuter executer = CreateSchema().MakeExecutable();
IQueryExecutor executor = CreateSchema().MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
Assert.Empty(result.Errors);
Expand All @@ -42,10 +42,10 @@ public async Task TypeIntrospectionOnQuery()
{
// arrange
string query = "{ __type (type: \"Foo\") { name } }";
IQueryExecuter executer = CreateSchema().MakeExecutable();
IQueryExecutor executor = CreateSchema().MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
Assert.Empty(result.Errors);
Expand All @@ -59,10 +59,10 @@ public async Task TypeIntrospectionOnQueryWithFields()
string query =
"{ __type (type: \"Foo\") " +
"{ name fields { name type { name } } } }";
IQueryExecuter executer = CreateSchema().MakeExecutable();
IQueryExecutor executor = CreateSchema().MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
Assert.Empty(result.Errors);
Expand All @@ -75,10 +75,10 @@ public async Task ExecuteGraphiQLIntrospectionQuery()
// arrange
string query =
FileResource.Open("IntrospectionQuery.graphql");
IQueryExecuter executer = CreateSchema().MakeExecutable();
IQueryExecutor executor = CreateSchema().MakeExecutable();

// act
IExecutionResult result = await executer.ExecuteAsync(query);
IExecutionResult result = await executor.ExecuteAsync(query);

// assert
Assert.Empty(result.Errors);
Expand Down
Loading

0 comments on commit a36600d

Please sign in to comment.