Skip to content

Commit be69f2b

Browse files
committed
AgainstWhiteSpace
1 parent b05d9fd commit be69f2b

9 files changed

Lines changed: 10 additions & 10 deletions

src/GraphQL.EntityFramework/Compress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static class Compress
66
{
77
public static string Query(string query)
88
{
9-
Guard.AgainstNullWhiteSpace(nameof(query), query);
9+
Guard.AgainstWhiteSpace(nameof(query), query);
1010
query = Regex.Replace(query, @"\s+", " ");
1111
return Regex.Replace(query, @"\s*(\[|\]|\{|\}|\(|\)|:|\,)\s*", "$1");
1212
}

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_Navigation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public FieldType AddNavigationField<TSource, TReturn>(
1818
string? description = null)
1919
where TReturn : class
2020
{
21-
Guard.AgainstNullWhiteSpace(nameof(name), name);
21+
Guard.AgainstWhiteSpace(nameof(name), name);
2222

2323
graphType ??= GraphTypeFinder.FindGraphType<TReturn>();
2424

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_NavigationConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void AddNavigationConnectionField<TSource, TReturn>(
2525
string? description = null)
2626
where TReturn : class
2727
{
28-
Guard.AgainstNullWhiteSpace(nameof(name), name);
28+
Guard.AgainstWhiteSpace(nameof(name), name);
2929
Guard.AgainstNegative(nameof(pageSize), pageSize);
3030

3131
itemGraphType ??= GraphTypeFinder.FindGraphType<TReturn>();

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_NavigationList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public FieldType AddNavigationListField<TSource, TReturn>(
1919
string? description = null)
2020
where TReturn : class
2121
{
22-
Guard.AgainstNullWhiteSpace(nameof(name), name);
22+
Guard.AgainstWhiteSpace(nameof(name), name);
2323

2424
var hasId = keyNames.ContainsKey(typeof(TReturn));
2525
FieldType field = new()

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_Queryable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ FieldType BuildQueryField<TSource, TReturn>(
4444
string? description)
4545
where TReturn : class
4646
{
47-
Guard.AgainstNullWhiteSpace(nameof(name), name);
47+
Guard.AgainstWhiteSpace(nameof(name), name);
4848

4949
var hasId = keyNames.ContainsKey(typeof(TReturn));
5050
FieldType fieldType = new()

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_QueryableConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void BuildQueryConnectionField<TSource, TReturn>(
4646
string? description)
4747
where TReturn : class
4848
{
49-
Guard.AgainstNullWhiteSpace(nameof(name), name);
49+
Guard.AgainstWhiteSpace(nameof(name), name);
5050
Guard.AgainstNegative(nameof(pageSize), pageSize);
5151

5252
itemGraphType ??= GraphTypeFinder.FindGraphType<TReturn>();

src/GraphQL.EntityFramework/GraphApi/EfGraphQLService_Single.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FieldType BuildSingleField<TSource, TReturn>(
6666
string? description)
6767
where TReturn : class
6868
{
69-
Guard.AgainstNullWhiteSpace(nameof(name), name);
69+
Guard.AgainstWhiteSpace(nameof(name), name);
7070

7171
graphType ??= GraphTypeFinder.FindGraphType<TReturn>(nullable);
7272

src/GraphQL.EntityFramework/Guard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
static class Guard
44
{
5-
public static void AgainstNullWhiteSpace(string argumentName, string value)
5+
public static void AgainstWhiteSpace(string argumentName, string value)
66
{
77
if (string.IsNullOrWhiteSpace(value))
88
{

src/GraphQL.EntityFramework/Testing/ClientQueryExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public ClientQueryExecutor(Func<object, string> toJson, string uri = "graphql")
1919

2020
public Task<HttpResponseMessage> ExecutePost(HttpClient client, string query, object? variables = null, Action<HttpHeaders>? headerAction = null)
2121
{
22-
Guard.AgainstNullWhiteSpace(nameof(query), query);
22+
Guard.AgainstWhiteSpace(nameof(query), query);
2323
query = CompressQuery(query);
2424
var body = new
2525
{
@@ -36,7 +36,7 @@ public Task<HttpResponseMessage> ExecutePost(HttpClient client, string query, ob
3636

3737
public Task<HttpResponseMessage> ExecuteGet(HttpClient client, string query, object? variables = null, Action<HttpHeaders>? headerAction = null)
3838
{
39-
Guard.AgainstNullWhiteSpace(nameof(query), query);
39+
Guard.AgainstWhiteSpace(nameof(query), query);
4040
var compressed = CompressQuery(query);
4141
var variablesString = ToJson(variables);
4242
var getUri = $"{uri}?query={compressed}&variables={variablesString}";

0 commit comments

Comments
 (0)