-
Notifications
You must be signed in to change notification settings - Fork 331
Expand file tree
/
Copy pathDefaultValueType.cs
More file actions
30 lines (28 loc) · 1.32 KB
/
DefaultValueType.cs
File metadata and controls
30 lines (28 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Azure.DataApiBuilder.Service.GraphQLBuilder.CustomScalars;
using HotChocolate.Types;
using static Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes.SupportedHotChocolateTypes;
namespace Azure.DataApiBuilder.Service.GraphQLBuilder.GraphQLTypes
{
public class DefaultValueType : InputObjectType
{
protected override void Configure(IInputObjectTypeDescriptor descriptor)
{
descriptor.Name("DefaultValue");
descriptor.OneOf();
descriptor.Field(BYTE_TYPE).Type<ByteType>();
descriptor.Field(SHORT_TYPE).Type<ShortType>();
descriptor.Field(INT_TYPE).Type<IntType>();
descriptor.Field(LONG_TYPE).Type<LongType>();
descriptor.Field(STRING_TYPE).Type<StringType>();
descriptor.Field(BOOLEAN_TYPE).Type<BooleanType>();
descriptor.Field(SINGLE_TYPE).Type<SingleType>();
descriptor.Field(FLOAT_TYPE).Type<FloatType>();
descriptor.Field(DECIMAL_TYPE).Type<DecimalType>();
descriptor.Field(DATETIME_TYPE).Type<DateTimeType>();
descriptor.Field(BYTEARRAY_TYPE).Type<Base64StringType>();
descriptor.Field(LOCALTIME_TYPE).Type<HotChocolate.Types.NodaTime.LocalTimeType>();
}
}
}