From 768459c5a25ac05aa2f0304353892b4ff434444c Mon Sep 17 00:00:00 2001 From: Tony Han Date: Thu, 16 May 2024 04:37:38 +0800 Subject: [PATCH] Update ContentItemVersionId nullable in GraphQL (#16030) --- .../Queries/Types/ContentItemInterface.cs | 2 +- .../Queries/Types/ContentItemType.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemInterface.cs b/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemInterface.cs index 4ce0c832dce..205d540b1dc 100644 --- a/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemInterface.cs +++ b/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemInterface.cs @@ -15,7 +15,7 @@ public ContentItemInterface(IOptions optionsAccessor) Name = "ContentItem"; Field(ci => ci.ContentItemId); - Field(ci => ci.ContentItemVersionId); + Field(ci => ci.ContentItemVersionId, nullable: true); Field(ci => ci.ContentType); Field(ci => ci.DisplayText, nullable: true); Field(ci => ci.Published); diff --git a/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemType.cs b/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemType.cs index 391c7caa0f3..c16e5e39b20 100644 --- a/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemType.cs +++ b/src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Queries/Types/ContentItemType.cs @@ -24,7 +24,7 @@ public ContentItemType(IOptions optionsAccessor) Name = "ContentItemType"; Field(ci => ci.ContentItemId).Description("Content item id"); - Field(ci => ci.ContentItemVersionId).Description("The content item version id"); + Field(ci => ci.ContentItemVersionId, nullable: true).Description("The content item version id"); Field(ci => ci.ContentType).Description("Type of content"); Field(ci => ci.DisplayText, nullable: true).Description("The display text of the content item"); Field(ci => ci.Published).Description("Is the published version"); @@ -32,7 +32,7 @@ public ContentItemType(IOptions optionsAccessor) Field("modifiedUtc").Resolve(ci => ci.Source.ModifiedUtc).Description("The date and time of modification"); Field("publishedUtc").Resolve(ci => ci.Source.PublishedUtc).Description("The date and time of publication"); Field("createdUtc").Resolve(ci => ci.Source.CreatedUtc).Description("The date and time of creation"); - Field(ci => ci.Owner).Description("The owner of the content item"); + Field(ci => ci.Owner, nullable: true).Description("The owner of the content item"); Field(ci => ci.Author).Description("The author of the content item"); Field("render")