Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
800de2b
Add support for timespan
Aniruddh25 Mar 31, 2023
827ba69
Merge origin/main
Aniruddh25 May 4, 2023
0f12bd1
remove unused using
Aniruddh25 May 5, 2023
7367244
Add a case for TimeSpanType in ResolverMiddleware
Aniruddh25 May 5, 2023
221baad
enclose name in []
Aniruddh25 May 5, 2023
d210db2
Support timespan as stored procedure parameter
Aniruddh25 May 6, 2023
296511f
Parse with invariant culture and assume UTC
Aniruddh25 May 6, 2023
8c23ffe
StoredProc default paramvalue
Aniruddh25 May 6, 2023
b000168
TimeSpan Iso8601 format is PT23H59M59.999999S
Aniruddh25 May 7, 2023
1c35eb5
fixing tests
May 8, 2023
f9ab1d5
fixing MsSql tests
May 8, 2023
25c86a1
Merge remote changes
Aniruddh25 May 9, 2023
1dd0f47
Add timespan test in supported types
Aniruddh25 May 9, 2023
cd9ec5a
Fix timespan_types column name
Aniruddh25 May 9, 2023
efb3007
Merge branch 'main' into supportTimeSpan
abhishekkumams May 10, 2023
e80ef05
Fix comparison of timespan data type
Aniruddh25 May 11, 2023
1aa7b65
Missing else
Aniruddh25 May 11, 2023
d32a767
resolving merge conflicts
Jul 5, 2023
d5d97fd
adding timespan type
Jul 6, 2023
bb581ff
resolving merge conflicts
Jul 6, 2023
09e85b3
fix formatting
Jul 6, 2023
9923fc8
Merge branch 'main' into supportTimeSpan
Aniruddh25 Jul 12, 2023
3c4eba3
handling nullable types
Jul 17, 2023
507802e
resolving nits
Jul 17, 2023
eafb08e
Merge branch 'main' of https://github.com/Azure/data-api-builder into…
Jul 17, 2023
d852138
fixing sql type
Jul 18, 2023
b84874f
Add TimeOnly format for HotChocolate
Jul 20, 2023
9e1a93c
fix formatting
Jul 20, 2023
84e11e6
Update dab-config.MsSql.json
abhishekkumams Jul 20, 2023
5549e02
Merge branches 'supportTimeSpan' and 'supportTimeSpan' of https://git…
Jul 20, 2023
d8d8f26
Merge branch 'main' of https://github.com/Azure/data-api-builder into…
Jul 20, 2023
38a9e24
fix test
Jul 20, 2023
718941b
fixing mysql tests
Jul 20, 2023
910c2d7
fixing tests
Jul 21, 2023
5e01c3c
fix formatting
Jul 21, 2023
fc0be04
fixing tests
Jul 24, 2023
ebd7725
fixing tests
Jul 24, 2023
0d0b263
fixing tests
Jul 24, 2023
33edfaa
using Hotchocolate.Types.NodaTime
Jul 25, 2023
907723b
resolving conflicts
Jul 25, 2023
9883d87
fix formatting
Jul 26, 2023
a3e968e
fixing tests
Jul 26, 2023
de93200
adding tests
Jul 26, 2023
1840105
adding tests for different time format
Jul 26, 2023
0d0e1a3
Merge branch 'main' of https://github.com/Azure/data-api-builder into…
Jul 27, 2023
4a19378
using max dateTime in the test to check no overflow issue
Jul 27, 2023
a6fa28f
fixing PGSQL tests
Jul 27, 2023
a9c396d
fixing tests
Jul 27, 2023
bdb5fcc
fixing mysql tests
Jul 27, 2023
a38db0e
adding more tests
Jul 27, 2023
dec4d15
nit fixes
Jul 31, 2023
127af62
nit fix
Jul 31, 2023
7ff72b8
nit fix
Jul 31, 2023
2b55cd4
updating test
Jul 31, 2023
7694c60
Merge branch 'main' into supportTimeSpan
abhishekkumams Jul 31, 2023
a05134b
added OData tests as well
Aug 1, 2023
de2f48a
Update src/Service.Tests/SqlTests/GraphQLSupportedTypesTests/GraphQLS…
abhishekkumams Aug 4, 2023
9676493
Update src/Service.Tests/SqlTests/GraphQLSupportedTypesTests/GraphQLS…
abhishekkumams Aug 4, 2023
ecec68e
fix formatting and adding tests
Aug 4, 2023
0d27f42
resolving merge conflicts
Aug 4, 2023
30a1336
fixing tests
Aug 4, 2023
f126b83
Update src/Core/Services/TypeHelper.cs
abhishekkumams Aug 14, 2023
e68e207
fix formatting
Aug 17, 2023
418711b
Merge branch 'main' into supportTimeSpan
abhishekkumams Aug 17, 2023
77e7536
Merge branch 'main' into supportTimeSpan
abhishekkumams Aug 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Core/Azure.DataApiBuilder.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageReference Include="HotChocolate" />
<PackageReference Include="HotChocolate.AspNetCore" />
<PackageReference Include="HotChocolate.AspNetCore.Authorization" />
<PackageReference Include="HotChocolate.Types.NodaTime" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.Azure.Cosmos" />
<PackageReference Include="Microsoft.Data.SqlClient" />
Expand Down
25 changes: 2 additions & 23 deletions src/Core/Parsers/EdmModelBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,9 @@ SourceDefinition sourceDefinition
// each column represents a property of the current entity we are adding
foreach (string column in sourceDefinition.Columns.Keys)
{
// need to convert our column system type to an Edm type
Type columnSystemType = sourceDefinition.Columns[column].SystemType;
EdmPrimitiveTypeKind type = EdmPrimitiveTypeKind.None;
if (columnSystemType.IsArray)
{
columnSystemType = columnSystemType.GetElementType()!;
}

type = columnSystemType.Name switch
{
"String" => EdmPrimitiveTypeKind.String,
"Guid" => EdmPrimitiveTypeKind.Guid,
"Byte" => EdmPrimitiveTypeKind.Byte,
"Int16" => EdmPrimitiveTypeKind.Int16,
"Int32" => EdmPrimitiveTypeKind.Int32,
"Int64" => EdmPrimitiveTypeKind.Int64,
"Single" => EdmPrimitiveTypeKind.Single,
"Double" => EdmPrimitiveTypeKind.Double,
"Decimal" => EdmPrimitiveTypeKind.Decimal,
"Boolean" => EdmPrimitiveTypeKind.Boolean,
"DateTime" or "DateTimeOffset" => EdmPrimitiveTypeKind.DateTimeOffset,
"Date" => EdmPrimitiveTypeKind.Date,
_ => throw new ArgumentException($"Column type {columnSystemType.Name} not yet supported."),
};
// need to convert our column system type to an Edm type
EdmPrimitiveTypeKind type = TypeHelper.GetEdmPrimitiveTypeFromSystemType(columnSystemType);

// The mapped (aliased) field name defined in the runtime config is used to create a representative
// OData StructuralProperty. The created property is then added to the EdmEntityType.
Expand Down
2 changes: 2 additions & 0 deletions src/Core/Parsers/ODataASTVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ private static object GetParamWithSystemType(string param, IEdmTypeReference edm
return DateTimeOffset.Parse(param);
case EdmPrimitiveTypeKind.String:
return param;
case EdmPrimitiveTypeKind.TimeOfDay:
return TimeOnly.Parse(param);
default:
// should never happen due to the config being validated for correct types
throw new NotSupportedException($"{edmType} is not supported");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System.Data;
using System.Globalization;
using System.Net;
using Azure.DataApiBuilder.Auth;
using Azure.DataApiBuilder.Config.DatabasePrimitives;
Expand Down Expand Up @@ -360,10 +361,12 @@ protected static object ParseParamAsSystemType(string param, Type systemType)
"Double" => double.Parse(param),
"Decimal" => decimal.Parse(param),
"Boolean" => bool.Parse(param),
"DateTime" => DateTimeOffset.Parse(param),
"DateTimeOffset" => DateTimeOffset.Parse(param),
"DateTime" => DateTimeOffset.Parse(param, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal),
Comment thread
abhishekkumams marked this conversation as resolved.
"DateTimeOffset" => DateTimeOffset.Parse(param, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal),
"Date" => DateOnly.Parse(param),
"Guid" => Guid.Parse(param),
"TimeOnly" => TimeOnly.Parse(param),
"TimeSpan" => TimeOnly.Parse(param),
Comment thread
abhishekkumams marked this conversation as resolved.
_ => throw new NotSupportedException($"{systemType.Name} is not supported")
};
}
Expand Down
6 changes: 5 additions & 1 deletion src/Core/Services/ResolverMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Globalization;
using System.Text.Json;
using Azure.DataApiBuilder.Core.Authorization;
using Azure.DataApiBuilder.Core.Models;
Expand All @@ -9,8 +10,10 @@
using HotChocolate.Execution;
using HotChocolate.Language;
using HotChocolate.Resolvers;
using HotChocolate.Types.NodaTime;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using NodaTime.Text;
using static Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes.SupportedTypes;

namespace Azure.DataApiBuilder.Core.Services
Expand Down Expand Up @@ -196,8 +199,9 @@ private static object PreParseLeaf(IMiddlewareContext context, string leafJson)
{
ByteType => byte.Parse(leafJson),
SingleType => Single.Parse(leafJson),
DateTimeType => DateTimeOffset.Parse(leafJson),
DateTimeType => DateTimeOffset.Parse(leafJson, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal),
ByteArrayType => Convert.FromBase64String(leafJson),
LocalTimeType => LocalTimePattern.ExtendedIso.Parse(leafJson).Value,
_ => leafJson
};
}
Expand Down
71 changes: 56 additions & 15 deletions src/Core/Services/TypeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Net;
using Azure.DataApiBuilder.Core.Services.OpenAPI;
using Azure.DataApiBuilder.Service.Exceptions;
using Microsoft.OData.Edm;

namespace Azure.DataApiBuilder.Core.Services
{
Expand All @@ -16,6 +17,10 @@ public static class TypeHelper
{
/// <summary>
/// Maps .NET Framework types to DbType enum
/// Not Adding a hard mapping for System.DateTime to DbType.DateTime as
/// Hotchocolate only has Hotchocolate.Types.DateTime for DbType.DateTime/DateTime2/DateTimeOffset,
/// which throws error when inserting/updating dateTime values due to type mismatch.
/// Therefore, seperate logic exists for proper mapping conversion in BaseSqlQueryStructure.
/// </summary>
private static Dictionary<Type, DbType> _systemTypeToDbTypeMap = new()
{
Expand All @@ -34,21 +39,10 @@ public static class TypeHelper
[typeof(string)] = DbType.String,
[typeof(char)] = DbType.StringFixedLength,
[typeof(Guid)] = DbType.Guid,
[typeof(DateTimeOffset)] = DbType.DateTimeOffset,
[typeof(byte[])] = DbType.Binary,
[typeof(byte?)] = DbType.Byte,
[typeof(sbyte?)] = DbType.SByte,
[typeof(short?)] = DbType.Int16,
[typeof(ushort?)] = DbType.UInt16,
[typeof(int?)] = DbType.Int32,
[typeof(uint?)] = DbType.UInt32,
[typeof(long?)] = DbType.Int64,
[typeof(ulong?)] = DbType.UInt64,
[typeof(float?)] = DbType.Single,
[typeof(double?)] = DbType.Double,
[typeof(decimal?)] = DbType.Decimal,
[typeof(bool?)] = DbType.Boolean,
[typeof(char?)] = DbType.StringFixedLength,
[typeof(Guid?)] = DbType.Guid,
[typeof(TimeOnly)] = DbType.Time,
[typeof(TimeSpan)] = DbType.Time,
Comment thread
abhishekkumams marked this conversation as resolved.
[typeof(object)] = DbType.Object
};

Expand Down Expand Up @@ -77,6 +71,7 @@ public static class TypeHelper
[typeof(Guid)] = JsonDataType.String,
[typeof(byte[])] = JsonDataType.String,
[typeof(TimeSpan)] = JsonDataType.String,
[typeof(TimeOnly)] = JsonDataType.String,
[typeof(object)] = JsonDataType.Object,
[typeof(DateTime)] = JsonDataType.String,
[typeof(DateTimeOffset)] = JsonDataType.String
Expand Down Expand Up @@ -108,14 +103,51 @@ public static class TypeHelper
[SqlDbType.SmallInt] = typeof(short),
[SqlDbType.SmallMoney] = typeof(decimal),
[SqlDbType.Text] = typeof(string),
[SqlDbType.Time] = typeof(TimeSpan),
[SqlDbType.Time] = typeof(TimeOnly),
[SqlDbType.Timestamp] = typeof(byte[]),
[SqlDbType.TinyInt] = typeof(byte),
[SqlDbType.UniqueIdentifier] = typeof(Guid),
[SqlDbType.VarBinary] = typeof(byte[]),
[SqlDbType.VarChar] = typeof(string)
};

/// <summary>
/// Given the system type, returns the corresponding primitive type kind.
/// </summary>
/// <param name="columnSystemType">Type of the column.</param>
/// <returns>EdmPrimitiveTypeKind</returns>
/// <exception cref="ArgumentException">Throws when the column</exception>
public static EdmPrimitiveTypeKind GetEdmPrimitiveTypeFromSystemType(Type columnSystemType)
{
if (columnSystemType.IsArray)
{
columnSystemType = columnSystemType.GetElementType()!;
}

EdmPrimitiveTypeKind type = columnSystemType.Name switch
{
"String" => EdmPrimitiveTypeKind.String,
"Guid" => EdmPrimitiveTypeKind.Guid,
"Byte" => EdmPrimitiveTypeKind.Byte,
"Int16" => EdmPrimitiveTypeKind.Int16,
"Int32" => EdmPrimitiveTypeKind.Int32,
"Int64" => EdmPrimitiveTypeKind.Int64,
"Single" => EdmPrimitiveTypeKind.Single,
"Double" => EdmPrimitiveTypeKind.Double,
"Decimal" => EdmPrimitiveTypeKind.Decimal,
"Boolean" => EdmPrimitiveTypeKind.Boolean,
"DateTime" => EdmPrimitiveTypeKind.DateTimeOffset,
"DateTimeOffset" => EdmPrimitiveTypeKind.DateTimeOffset,
"Date" => EdmPrimitiveTypeKind.Date,
"TimeOnly" => EdmPrimitiveTypeKind.TimeOfDay,
"TimeSpan" => EdmPrimitiveTypeKind.TimeOfDay,
Comment thread
abhishekkumams marked this conversation as resolved.
_ => throw new ArgumentException($"Column type" +
$" {columnSystemType.Name} not yet supported.")
};

return type;
}

/// <summary>
/// Converts the .NET Framework (System/CLR) type to JsonDataType.
/// Primitive data types in the OpenAPI standard (OAS) are based on the types supported
Expand Down Expand Up @@ -151,6 +183,15 @@ public static JsonDataType GetJsonDataTypeFromSystemType(Type type)
/// <returns>DbType for the given system type. Null when no mapping exists.</returns>
public static DbType? GetDbTypeFromSystemType(Type systemType)
{
// Get the underlying type argument if the 'systemType' argument is a nullable type.
Type? nullableUnderlyingType = Nullable.GetUnderlyingType(systemType);
Comment thread
Aniruddh25 marked this conversation as resolved.

// Will not be null when the input argument 'systemType' is a closed generic nullable type.
if (nullableUnderlyingType is not null)
{
systemType = nullableUnderlyingType;
}

if (!_systemTypeToDbTypeMap.TryGetValue(systemType, out DbType dbType))
{
return null;
Expand Down
3 changes: 2 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PackageVersion Include="HotChocolate" Version="12.18.0" />
<PackageVersion Include="HotChocolate.AspNetCore" Version="12.18.0" />
<PackageVersion Include="HotChocolate.AspNetCore.Authorization" Version="12.18.0" />
<PackageVersion Include="HotChocolate.Types.NodaTime" Version="12.18.0" />
<PackageVersion Include="Humanizer" Version="2.14.1" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="DotNetEnv" Version="2.5.0" />
Expand All @@ -19,7 +20,7 @@
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.14" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.20.0" />
<!--When updating Microsoft.Data.SqlClient, update license URL in scripts/notice-generation.ps1-->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.1" />
Comment thread
seantleonard marked this conversation as resolved.
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<ItemGroup>
<PackageReference Include="HotChocolate" />
<PackageReference Include="HotChocolate.AspNetCore.Authorization" />
<PackageReference Include="HotChocolate.Types.NodaTime" />
<PackageReference Include="Humanizer" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="StyleCop.Analyzers">
Expand Down
2 changes: 2 additions & 0 deletions src/Service.GraphQLBuilder/GraphQLTypes/DefaultValueType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Azure.DataApiBuilder.Service.GraphQLBuilder.CustomScalars;
using HotChocolate.Types;
using HotChocolate.Types.NodaTime;
using static Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes.SupportedTypes;

namespace Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes
Expand All @@ -24,6 +25,7 @@ protected override void Configure(IInputObjectTypeDescriptor descriptor)
descriptor.Field(DECIMAL_TYPE).Type<DecimalType>();
descriptor.Field(DATETIME_TYPE).Type<DateTimeType>();
descriptor.Field(BYTEARRAY_TYPE).Type<ByteArrayType>();
descriptor.Field(LOCALTIME_TYPE).Type<LocalTimeType>();
}
}
}
4 changes: 3 additions & 1 deletion src/Service.GraphQLBuilder/GraphQLTypes/SupportedTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ public static class SupportedTypes
public const string STRING_TYPE = "String";
public const string BOOLEAN_TYPE = "Boolean";
public const string DATETIME_TYPE = "DateTime";
public const string DATETIME_NONUTC_TYPE = "DateTimeNonUTC";
public const string DATETIMEOFFSET_TYPE = "DateTimeOffset";
public const string BYTEARRAY_TYPE = "ByteArray";
public const string GUID_TYPE = "Guid";
public const string LOCALTIME_TYPE = "LocalTime";
public const string TIME_TYPE = "Time";
}
}
Comment thread
abhishekkumams marked this conversation as resolved.
10 changes: 8 additions & 2 deletions src/Service.GraphQLBuilder/GraphQLUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Net;
using Azure.DataApiBuilder.Config.DatabasePrimitives;
using Azure.DataApiBuilder.Config.ObjectModel;
Expand All @@ -11,6 +12,8 @@
using Azure.DataApiBuilder.Service.GraphQLBuilder.Sql;
using HotChocolate.Language;
using HotChocolate.Types;
using HotChocolate.Types.NodaTime;
using NodaTime.Text;
using static Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes.SupportedTypes;

namespace Azure.DataApiBuilder.Service.GraphQLBuilder
Expand Down Expand Up @@ -52,7 +55,8 @@ public static bool IsBuiltInType(ITypeNode typeNode)
STRING_TYPE,
BOOLEAN_TYPE,
DATETIME_TYPE,
BYTEARRAY_TYPE
BYTEARRAY_TYPE,
LOCALTIME_TYPE
};
string name = typeNode.NamedType().Name.Value;
return inBuiltTypes.Contains(name);
Expand Down Expand Up @@ -239,8 +243,10 @@ public static Tuple<string, IValueNode> ConvertValueToGraphQLType(string default
SINGLE_TYPE => new(SINGLE_TYPE, new SingleType().ParseValue(float.Parse(defaultValueFromConfig))),
FLOAT_TYPE => new(FLOAT_TYPE, new FloatValueNode(double.Parse(defaultValueFromConfig))),
DECIMAL_TYPE => new(DECIMAL_TYPE, new FloatValueNode(decimal.Parse(defaultValueFromConfig))),
DATETIME_TYPE => new(DATETIME_TYPE, new DateTimeType().ParseResult(DateTime.Parse(defaultValueFromConfig))),
DATETIME_TYPE => new(DATETIME_TYPE, new DateTimeType().ParseResult(
DateTime.Parse(defaultValueFromConfig, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal))),
Comment thread
abhishekkumams marked this conversation as resolved.
BYTEARRAY_TYPE => new(BYTEARRAY_TYPE, new ByteArrayType().ParseValue(Convert.FromBase64String(defaultValueFromConfig))),
LOCALTIME_TYPE => new(LOCALTIME_TYPE, new LocalTimeType().ParseResult(LocalTimePattern.ExtendedIso.Parse(defaultValueFromConfig).Value)),
Comment thread
abhishekkumams marked this conversation as resolved.
_ => throw new NotSupportedException(message: $"The {defaultValueFromConfig} parameter's value type [{paramValueType}] is not supported.")
};

Expand Down
21 changes: 20 additions & 1 deletion src/Service.GraphQLBuilder/Queries/StandardQueryInputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Azure.DataApiBuilder.Service.GraphQLBuilder.CustomScalars;
using HotChocolate.Language;
using HotChocolate.Types;
using HotChocolate.Types.NodaTime;
using static Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes.SupportedTypes;

namespace Azure.DataApiBuilder.Service.GraphQLBuilder.Queries
Expand Down Expand Up @@ -201,6 +202,23 @@ public static InputObjectTypeDefinitionNode ByteArrayInputType() =>
}
);

public static InputObjectTypeDefinitionNode LocalTimeInputType() =>
new(
location: null,
new NameNode("LocalTimeFilterInput"),
new StringValueNode("Input type for adding LocalTime filters"),
new List<DirectiveNode>(),
new List<InputValueDefinitionNode> {
new InputValueDefinitionNode(null, new NameNode("eq"), new StringValueNode("Equals"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("gt"), new StringValueNode("Greater Than"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("gte"), new StringValueNode("Greater Than or Equal To"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("lt"), new StringValueNode("Less Than"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("lte"), new StringValueNode("Less Than or Equal To"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("neq"), new StringValueNode("Not Equals"), new LocalTimeType().ToTypeNode(), null, new List<DirectiveNode>()),
new InputValueDefinitionNode(null, new NameNode("isNull"), new StringValueNode("is null test"), new BooleanType().ToTypeNode(), null, new List<DirectiveNode>())
}
);

public static Dictionary<string, InputObjectTypeDefinitionNode> InputTypes = new()
{
{ "ID", IdInputType() },
Expand All @@ -214,7 +232,8 @@ public static InputObjectTypeDefinitionNode ByteArrayInputType() =>
{ BOOLEAN_TYPE, BooleanInputType() },
{ STRING_TYPE, StringInputType() },
{ DATETIME_TYPE, DateTimeInputType() },
{ BYTEARRAY_TYPE, ByteArrayInputType() }
{ BYTEARRAY_TYPE, ByteArrayInputType() },
{ LOCALTIME_TYPE, LocalTimeInputType() },
};

/// <summary>
Expand Down
Loading