From 217a0c467d851a5e5e45e9b561bacf1e8dc48212 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 02:24:00 +0000 Subject: [PATCH 1/2] Clarify that private attributes are writable in GraphQL mutation inputs Private attributes (private: true) are now included in generated mutation input types so clients can set them via create/update mutations, while remaining hidden from response types and filter inputs. Based on strapi/strapi#26489. --- docusaurus/docs/cms/api/graphql.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docusaurus/docs/cms/api/graphql.md b/docusaurus/docs/cms/api/graphql.md index 9db4738281..0ee82d8457 100644 --- a/docusaurus/docs/cms/api/graphql.md +++ b/docusaurus/docs/cms/api/graphql.md @@ -491,6 +491,10 @@ For instance, for a "Restaurant" content-type, the following mutations are gener | Update an existing "Restaurant" restaurant | `updateRestaurant` | | Delete an existing "Restaurant" restaurant | `deleteRestaurant` | +:::note Private attributes in mutation inputs +Attributes marked `private: true` in a content-type schema are **included** in the generated mutation input types (e.g., `RestaurantInput!`) so they can be set via create and update mutations. Private attributes remain hidden from GraphQL query response types and filter inputs — they are write-only from a GraphQL perspective. +::: + ### Create a new document When creating new documents, the `data` argument will have an associated input type that is specific to your content-type. From de0b01dcf3f42a335dbd5b7d74a7b64a65c47d8d Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Thu, 16 Jul 2026 17:02:06 +0200 Subject: [PATCH 2/2] Apply suggestion from @pwizla --- docusaurus/docs/cms/api/graphql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/cms/api/graphql.md b/docusaurus/docs/cms/api/graphql.md index 0ee82d8457..06df79753e 100644 --- a/docusaurus/docs/cms/api/graphql.md +++ b/docusaurus/docs/cms/api/graphql.md @@ -492,7 +492,7 @@ For instance, for a "Restaurant" content-type, the following mutations are gener | Delete an existing "Restaurant" restaurant | `deleteRestaurant` | :::note Private attributes in mutation inputs -Attributes marked `private: true` in a content-type schema are **included** in the generated mutation input types (e.g., `RestaurantInput!`) so they can be set via create and update mutations. Private attributes remain hidden from GraphQL query response types and filter inputs — they are write-only from a GraphQL perspective. +Attributes marked `private: true` in a content-type schema are **included** in the generated mutation input types (e.g., `RestaurantInput!`) so they can be set via create and update mutations. Private attributes remain hidden from GraphQL query response types and filter inputs, as they are write-only from a GraphQL perspective. ::: ### Create a new document