Skip to content

Commit

Permalink
Merge pull request #939 from clement911/master
Browse files Browse the repository at this point in the history
Added GraphQLJsonSerializerOptions class.
  • Loading branch information
clement911 authored Oct 15, 2023
2 parents e4e50bd + 7f81cda commit 3e0fbb1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5,398 deletions.
2 changes: 1 addition & 1 deletion ShopifySharp.Tests/GenerateGraphQLSchema_Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ShopifySharp.Tests
[Trait("Category", "GraphQL")]
public class GenerateGraphQLSchema_Test
{
[Fact(Skip = "This test should be run manually to re-generate the GraphQL types whenever the API version is upgraded")]
[Fact/*(Skip = "This test should be run manually to re-generate the GraphQL types whenever the API version is upgraded")*/]
public async Task GenerateGraphQLTypes()
{
var scalarNameToTypeName = new Dictionary<string, string>
Expand Down
2 changes: 1 addition & 1 deletion ShopifySharp.Tests/ShopifySharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Wish.GraphQLSchemaGenerator">
<Version>1.3.0</Version>
<Version>1.3.1</Version>
</PackageReference>
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions ShopifySharp/Entities/GraphQL/GraphQLJsonSerializerOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Text.Json;
using System.Text.Json.Serialization;

namespace ShopifySharp.Entities.GraphQL
{
internal class GraphQLJsonSerializerOptions
{
public static readonly JsonSerializerOptions Instance = new JsonSerializerOptions
{
NumberHandling = JsonNumberHandling.AllowReadingFromString,
Converters = { new JsonStringEnumConverter() },
};
}
}
Loading

0 comments on commit 3e0fbb1

Please sign in to comment.