Skip to content

Commit

Permalink
fix: add + configure uint graphql scalar type
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILLIPS71 committed Jun 3, 2024
1 parent 0cfb015 commit c5e1997
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.Data" Version="13.9.0" />
<PackageReference Include="HotChocolate.Types" Version="13.9.0" />
<PackageReference Include="HotChocolate.Data" Version="13.9.5" />
<PackageReference Include="HotChocolate.Types" Version="13.9.5" />
<PackageReference Include="HotChocolate.Types.Scalars" Version="13.9.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
using Giantnodes.Infrastructure.GraphQL.Scalars;
using HotChocolate.Data.Filters;

namespace Giantnodes.Infrastructure.GraphQL.Scalars;
namespace Giantnodes.Infrastructure.GraphQL;

public class CharFilterConvention : FilterConvention
public sealed class GiantnodesFilterConvention : FilterConvention
{
protected override void Configure(IFilterConventionDescriptor descriptor)
{
base.Configure(descriptor);

descriptor.BindRuntimeType<char, CharOperationFilterInputType>();
descriptor.BindRuntimeType<char?, CharOperationFilterInputType>();

descriptor.BindRuntimeType<uint, UnsignedIntOperationFilterInputType>();
descriptor.BindRuntimeType<uint?, UnsignedIntOperationFilterInputType>();

descriptor.AddDefaults();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Giantnodes.Infrastructure.GraphQL.Scalars;

public class CharOperationFilterInputType : ComparableOperationFilterInputType<CharType>
public sealed class CharOperationFilterInputType : ComparableOperationFilterInputType<CharType>
{
protected override void Configure(IFilterInputTypeDescriptor descriptor)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/src/GraphQL/Scalars/CharType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Giantnodes.Infrastructure.GraphQL.Scalars;

public class CharType : ScalarType<char, StringValueNode>
public sealed class CharType : ScalarType<char, StringValueNode>
{
/// <summary>
/// Initializes a new instance of the <see cref="CharType"/> class.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using HotChocolate.Data.Filters;
using HotChocolate.Types;

namespace Giantnodes.Infrastructure.GraphQL.Scalars;

public sealed class UnsignedIntOperationFilterInputType : ComparableOperationFilterInputType<UnsignedIntType>
{
protected override void Configure(IFilterInputTypeDescriptor descriptor)
{
descriptor.Name("UnsignedIntOperationFilterInput");
base.Configure(descriptor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.1" />
<PackageReference Include="HotChocolate.Abstractions" Version="13.9.4" />
<PackageReference Include="HotChocolate.Abstractions" Version="13.9.5" />
<PackageReference Include="MassTransit" Version="8.2.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="13.9.4" />
<PackageReference Include="HotChocolate.AspNetCore.CommandLine" Version="13.9.4" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="13.9.4" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="13.9.4" />
<PackageReference Include="HotChocolate.AspNetCore" Version="13.9.5" />
<PackageReference Include="HotChocolate.AspNetCore.CommandLine" Version="13.9.5" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="13.9.5" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="13.9.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit c5e1997

Please sign in to comment.