Husqvik / GraphQlClientGenerator

GraphQL C# client generator
MIT License
213 stars 49 forks source link

DateTime, long has type object #157

Closed VusalDev closed 5 months ago

VusalDev commented 5 months ago

Schema:

"""
The `Long` scalar type represents non-fractional signed whole 64-bit numeric values. Long can represent values between -(2^63) and 2^63 - 1.
"""
scalar Long

"""
The `DateTime` scalar represents an ISO-8601 compliant date time type.
"""
scalar DateTime @specifiedBy(url: "https://www.graphql-scalars.com/date-time")

type EventDetails {
  displayId: Long!
  startTime: DateTime
}

Conversion results:

    public partial class EventDetails
    {
        public object DisplayId { get; set; }
        public object StartTime { get; set; }
    }

At the moment I have to use DateTime.TryParse, long.TryParse, but I would like the generator can generate the correct type.