Eklee-Azure-Functions-GraphQl
Eklee-Azure-Functions-GraphQl copied to clipboard
New Version 0.32. problems with nullable model variables
Hi David Lee, thank you very much for the update to the GraphQL version of .NET. I have started to switch to this version and have found a few problems. I am using two DateTimeOffice variables with null values. These are now throwing an exception in the new version.
`[Description("Ende of the Publication")] public DateTimeOffset? PublishingDateStart { get; set; } [Description("Start of the Publication")]
public DateTimeOffset? PublishingDateEnd { get; set; }
`
[2021-01-24T16:56:18.300Z] Executed 'graphql' (Failed, Id=b2f31492-ffaf-4f59-98a5-ad22064279b0, Duration=7153ms)
[2021-01-24T16:56:18.301Z] System.Private.CoreLib: Exception while executing function: graphql. Autofac: An exception was thrown while activating Eklee.Azure.Functions.GraphQl.ModelConventionType1[[System.Nullable1[[System.DateTimeOffset, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]. Autofac: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Logging.ILogger)' on type 'ModelConventionType1'. GraphQL: A type name must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but nullable1 does not. (Parameter 'name').
Hi @rheid - please try out v 0.35 - I have implemented a fix there.
Thank you very much, I will test it right away and give you feedback.