Skip to content

Commit 19e3ef3

Browse files
author
Chris Podmore
committed
Issue #21 - CustomJsonStringifiedEnumConverter should only be for writing, updated template
1 parent e96cb52 commit 19e3ef3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tocsoft.GraphQLCodeGen.Cli/Templates/cs/CSharp.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ namespace {{Namespace}}
102102
return typeof(IStringifiedEnum).IsAssignableFrom(objectType);
103103
}
104104

105+
public override bool CanRead => false;
106+
105107
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
106108
{
107-
return reader.Value == null ? null : reader.Value.ToString();
109+
throw new NotImplementedException();
108110
}
109111

110112
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)

0 commit comments

Comments
 (0)