Skip to content

Commit

Permalink
Fixed Filter and Paging Issues (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Aug 8, 2019
1 parent 1c1906e commit 3a996ad
Show file tree
Hide file tree
Showing 323 changed files with 1,789 additions and 1,903 deletions.
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
Expand Down
37 changes: 10 additions & 27 deletions src/Core/Abstractions.Tests/Abstractions.Tests.csproj
@@ -1,39 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>HotChocolate.Abstractions.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<IsPackable>false</IsPackable>

<ChilliCurrentDirectory>$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))</ChilliCurrentDirectory>
<ChilliImport>$([System.IO.Path]::Combine($(ChilliCurrentDirectory), '..', '..', '..', 'tools'))</ChilliImport>
<ChilliFramework>$([System.IO.Path]::Combine($(ChilliImport), 'CoreTestFramework.props'))</ChilliFramework>
<ChilliBuild>$([System.IO.Path]::Combine($(ChilliImport), 'TestSettings.props'))</ChilliBuild>
</PropertyGroup>

<Import Project="$(ChilliFramework)" />
<Import Project="$(ChilliBuild)" />

<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<AssemblyName>HotChocolate.Abstractions.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="coverlet.msbuild" Version="2.5.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="ChilliCream.Testing.Utilities" Version="0.2.0" />
<PackageReference Include="Snapshooter.Xunit" Version="0.4.7" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.4.0-beta.1.build3958" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Abstractions\Abstractions.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="__snapshots__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="__resources__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
30 changes: 12 additions & 18 deletions src/Core/Abstractions/Abstractions.csproj
@@ -1,26 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFrameworks Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">netstandard2.0; net461</TargetFrameworks>
<AssemblyName>HotChocolate.Abstractions</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<PackageId>HotChocolate.Abstractions</PackageId>
<Description>Contains common abstractions used between the Hot Chocolate GraphQL type system and the GraphQL query execution engine.</Description>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<ChilliCurrentDirectory>$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))</ChilliCurrentDirectory>
<ChilliImport>$([System.IO.Path]::Combine($(ChilliCurrentDirectory), '..', '..', '..', 'tools'))</ChilliImport>
<ChilliFramework>$([System.IO.Path]::Combine($(ChilliImport), 'CoreFramework.props'))</ChilliFramework>
<ChilliBuild>$([System.IO.Path]::Combine($(ChilliImport), 'BuildSettings.props'))</ChilliBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<Import Project="$(ChilliFramework)" />
<Import Project="$(ChilliBuild)" />

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<PropertyGroup>
<PackageId>HotChocolate.Abstractions</PackageId>
<AssemblyName>HotChocolate.Abstractions</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<Description>Contains common abstractions used between the Hot Chocolate GraphQL type system and the GraphQL query execution engine.</Description>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/Core/Abstractions/AttributeExtensions.cs
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using HotChocolate.Utilities;
using HotChocolate.Language;

namespace HotChocolate
{
Expand All @@ -25,7 +25,7 @@ public static string GetGraphQLName(this Type type)
typeof(GraphQLNameAttribute), false)
? typeInfo.GetCustomAttribute<GraphQLNameAttribute>().Name
: GetFromType(typeInfo);
return NameUtils.RemoveInvalidCharacters(name);
return NameUtils.MakeValidGraphQLName(name);
}

public static string GetGraphQLName(this PropertyInfo property)
Expand All @@ -34,7 +34,7 @@ public static string GetGraphQLName(this PropertyInfo property)
typeof(GraphQLNameAttribute), false)
? property.GetCustomAttribute<GraphQLNameAttribute>().Name
: NormalizeName(property.Name);
return NameUtils.RemoveInvalidCharacters(name);
return NameUtils.MakeValidGraphQLName(name);
}

public static string GetGraphQLName(this MethodInfo method)
Expand All @@ -43,7 +43,7 @@ public static string GetGraphQLName(this MethodInfo method)
typeof(GraphQLNameAttribute), false)
? method.GetCustomAttribute<GraphQLNameAttribute>().Name
: NormalizeMethodName(method);
return NameUtils.RemoveInvalidCharacters(name);
return NameUtils.MakeValidGraphQLName(name);
}

public static string GetGraphQLName(this ParameterInfo parameter)
Expand All @@ -52,7 +52,7 @@ public static string GetGraphQLName(this ParameterInfo parameter)
typeof(GraphQLNameAttribute), false)
? parameter.GetCustomAttribute<GraphQLNameAttribute>().Name
: NormalizeName(parameter.Name);
return NameUtils.RemoveInvalidCharacters(name);
return NameUtils.MakeValidGraphQLName(name);
}

public static string GetGraphQLName(this MemberInfo member)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Abstractions/NameString.cs
@@ -1,8 +1,8 @@
using System;
using System.ComponentModel;
using System.Globalization;
using HotChocolate.Language;
using HotChocolate.Properties;
using HotChocolate.Utilities;

namespace HotChocolate
{
Expand All @@ -11,7 +11,7 @@ namespace HotChocolate
/// GraphQL spec rules: /[_A-Za-z][_0-9A-Za-z]*/
/// </summary>
[TypeConverter(typeof(NameStringConverter))]
public struct NameString
public readonly struct NameString
: IEquatable<NameString>
, IComparable<NameString>
{
Expand All @@ -23,7 +23,7 @@ public struct NameString
/// <exception cref="ArgumentException"
public NameString(string value)
{
if (!NameUtils.IsValidName(value))
if (!NameUtils.IsValidGraphQLName(value))
{
throw new ArgumentException(
string.Format(CultureInfo.InvariantCulture,
Expand Down
@@ -1,46 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>HotChocolate.Core.Diagnostics.ApolloTracing.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<IsPackable>false</IsPackable>

<ChilliCurrentDirectory>$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))</ChilliCurrentDirectory>
<ChilliImport>$([System.IO.Path]::Combine($(ChilliCurrentDirectory), '..', '..', '..', 'tools'))</ChilliImport>
<ChilliFramework>$([System.IO.Path]::Combine($(ChilliImport), 'CoreTestFramework.props'))</ChilliFramework>
<ChilliBuild>$([System.IO.Path]::Combine($(ChilliImport), 'TestSettings.props'))</ChilliBuild>
</PropertyGroup>

<Import Project="$(ChilliFramework)" />
<Import Project="$(ChilliBuild)" />

<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<AssemblyName>HotChocolate.Core.Diagnostics.ApolloTracing.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="coverlet.msbuild" Version="2.5.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.1" />
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0" />
<PackageReference Include="ChilliCream.Testing.Utilities" Version="0.2.0" />
<PackageReference Include="Snapshooter.Xunit" Version="0.4.7" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.4.0-beta.1.build3958" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="__snapshots__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="__resources__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
@@ -1,46 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>HotChocolate.Core.Diagnostics.CustomObserver.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<IsPackable>false</IsPackable>

<ChilliCurrentDirectory>$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))</ChilliCurrentDirectory>
<ChilliImport>$([System.IO.Path]::Combine($(ChilliCurrentDirectory), '..', '..', '..', 'tools'))</ChilliImport>
<ChilliFramework>$([System.IO.Path]::Combine($(ChilliImport), 'CoreTestFramework.props'))</ChilliFramework>
<ChilliBuild>$([System.IO.Path]::Combine($(ChilliImport), 'TestSettings.props'))</ChilliBuild>
</PropertyGroup>

<Import Project="$(ChilliFramework)" />
<Import Project="$(ChilliBuild)" />

<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<AssemblyName>HotChocolate.Core.Diagnostics.CustomObserver.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="coverlet.msbuild" Version="2.5.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.1" />
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0" />
<PackageReference Include="ChilliCream.Testing.Utilities" Version="0.2.0" />
<PackageReference Include="Snapshooter.Xunit" Version="0.4.7" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.4.0-beta.1.build3958" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="__snapshots__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="__resources__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
51 changes: 10 additions & 41 deletions src/Core/Core.Tests/Core.Tests.csproj
@@ -1,55 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>HotChocolate.Core.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
<IsPackable>false</IsPackable>

<ChilliCurrentDirectory>$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))</ChilliCurrentDirectory>
<ChilliImport>$([System.IO.Path]::Combine($(ChilliCurrentDirectory), '..', '..', '..', 'tools'))</ChilliImport>
<ChilliFramework>$([System.IO.Path]::Combine($(ChilliImport), 'CoreTestFramework.props'))</ChilliFramework>
<ChilliBuild>$([System.IO.Path]::Combine($(ChilliImport), 'TestSettings.props'))</ChilliBuild>
</PropertyGroup>

<Import Project="$(ChilliFramework)" />
<Import Project="$(ChilliBuild)" />

<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<AssemblyName>HotChocolate.Core.Tests</AssemblyName>
<RootNamespace>HotChocolate</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="coverlet.msbuild" Version="2.5.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.1" />
<PackageReference Include="Microsoft.Extensions.DiagnosticAdapter" Version="2.1.0" />
<PackageReference Include="ChilliCream.Testing.Utilities" Version="0.2.0" />
<PackageReference Include="Snapshooter.Xunit" Version="0.4.7" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.4.0-beta.1.build3958" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
<ProjectReference Include="..\Subscriptions.InMemory\Subscriptions.InMemory.csproj" />
<ProjectReference Include="..\StarWars\StarWars.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="__snapshots__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="__resources__\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="Execution\Errors\__snapshots__\__mismatch__\" />
<Folder Include="Execution\__snapshots__\__mismatch__\" />
<Folder Include="Integration\TypeConversion\__snapshots__\__mismatch__\" />
<Folder Include="Execution\Batching\" />
</ItemGroup>

</Project>
Expand Up @@ -7,7 +7,6 @@
using HotChocolate.Execution.Configuration;
using HotChocolate.Execution.Instrumentation;
using HotChocolate.Language;
using HotChocolate.Runtime;
using HotChocolate.Utilities;
using Snapshooter.Xunit;
using Xunit;
Expand Down
@@ -1,10 +1,9 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using ChilliCream.Testing;
using HotChocolate.Execution.Instrumentation;
using HotChocolate.Language;
using HotChocolate.Runtime;
using HotChocolate.Utilities;
using Snapshooter.Xunit;
using Xunit;

Expand Down

0 comments on commit 3a996ad

Please sign in to comment.