diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization/DefaultAuthorizationHandler.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization/DefaultAuthorizationHandler.cs index 4101cb2a9e8..2bd17af5b7f 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization/DefaultAuthorizationHandler.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization/DefaultAuthorizationHandler.cs @@ -45,6 +45,8 @@ public DefaultAuthorizationHandler( throw new ArgumentNullException(nameof(authorizationPolicyCache)); #if NET7_0_OR_GREATER _canCachePolicies = _authorizationPolicyProvider.AllowsCachingPolicies; +#else + _canCachePolicies = true; #endif }