From 983d8b9f9dac5f10cecedb414812507f67655ebd Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 18 Nov 2024 11:25:39 +0200 Subject: [PATCH] Added migration section for OnlyAllowPersistedOperations option change --- .../v14/migrating/migrate-from-13-to-14.md | 14 ++++++++++++++ .../v15/migrating/migrate-from-13-to-14.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md b/website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md index 9f1fd82d025..d38907a560b 100644 --- a/website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md +++ b/website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md @@ -233,6 +233,20 @@ Accessing a keyed service that has not been registered will now throw, instead o This change aligns the API with the regular (non-keyed) service access API. +## Change to OnlyAllowPersistedOperations option + +**Before** + +```csharp +ModifyRequestOptions(o => o.OnlyAllowPersistedOperations = true); +``` + +**After** + +```csharp +ModifyRequestOptions(o => o.PersistedOperations.OnlyAllowPersistedDocuments = true); +``` + # Deprecations Things that will continue to function this release, but we encourage you to move away from. diff --git a/website/src/docs/hotchocolate/v15/migrating/migrate-from-13-to-14.md b/website/src/docs/hotchocolate/v15/migrating/migrate-from-13-to-14.md index 9f1fd82d025..d38907a560b 100644 --- a/website/src/docs/hotchocolate/v15/migrating/migrate-from-13-to-14.md +++ b/website/src/docs/hotchocolate/v15/migrating/migrate-from-13-to-14.md @@ -233,6 +233,20 @@ Accessing a keyed service that has not been registered will now throw, instead o This change aligns the API with the regular (non-keyed) service access API. +## Change to OnlyAllowPersistedOperations option + +**Before** + +```csharp +ModifyRequestOptions(o => o.OnlyAllowPersistedOperations = true); +``` + +**After** + +```csharp +ModifyRequestOptions(o => o.PersistedOperations.OnlyAllowPersistedDocuments = true); +``` + # Deprecations Things that will continue to function this release, but we encourage you to move away from.