Skip to content

Commit 8dbc0da

Browse files
committed
Do not add DateOnly converter to generated DateTime properties when targeting .NET Standard 2.0
This fixes a bug that prevented .NET Standard 2.0 from deserializing generated GraphQL types that had a DateTime property. type: fix scope: generated-graphql
1 parent 0504bfb commit 8dbc0da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ShopifySharp.GraphQL.Parser/Writer.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ let private writeJsonPropertyAttribute (propertyName: string) writer : ValueTask
260260
let private writeDateOnlyJsonConverterAttribute (fieldType: FieldType) writer: ValueTask =
261261
let fieldValueType = unwrapFieldType fieldType
262262
pipeWriter writer {
263-
if fieldValueType = FieldValueType.DateOnly || fieldValueType = FieldValueType.DateTime then
263+
if fieldValueType = FieldValueType.DateOnly then
264264
do! (toTab Indented) + "#if NETSTANDARD2_0"
265265
do! NewLine
266266
// This attribute comes from the Portable.System.DateTimeOnly.Json package

0 commit comments

Comments
 (0)