diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs index 23a4db8b563..33a8e130729 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs @@ -21,7 +21,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Boolean field", FieldType = typeof(BooleanGraphType), UnderlyingType = typeof(BooleanField), - FieldAccessor = field => field.Content.Value, + FieldAccessor = field => ((BooleanField)field).Value, } }, { @@ -31,7 +31,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Date field", FieldType = typeof(DateGraphType), UnderlyingType = typeof(DateField), - FieldAccessor = field => field.Content.Value, + FieldAccessor = field => ((DateField)field).Value, } }, { @@ -41,7 +41,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Date & time field", FieldType = typeof(DateTimeGraphType), UnderlyingType = typeof(DateTimeField), - FieldAccessor = field => field.Content.Value, + FieldAccessor = field => ((DateTimeField)field).Value, } }, { @@ -51,7 +51,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Numeric field", FieldType = typeof(DecimalGraphType), UnderlyingType = typeof(NumericField), - FieldAccessor = field => field.Content.Value, + FieldAccessor = field => ((NumericField)field).Value, } }, { @@ -61,7 +61,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Text field", FieldType = typeof(StringGraphType), UnderlyingType = typeof(TextField), - FieldAccessor = field => field.Content.Text, + FieldAccessor = field => ((TextField)field).Text, } }, { @@ -71,7 +71,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Time field", FieldType = typeof(TimeSpanGraphType), UnderlyingType = typeof(TimeField), - FieldAccessor = field => field.Content.Value, + FieldAccessor = field => ((TimeField)field).Value, } }, { @@ -81,7 +81,7 @@ public class ContentFieldsProvider : IContentFieldProvider Description = "Multi text field", FieldType = typeof(ListGraphType), UnderlyingType = typeof(MultiTextField), - FieldAccessor = field => field.Content.Values, + FieldAccessor = field => ((MultiTextField)field).Values, } } };