From 10b20f5470a53c19c61d7aa94fe296cf0abd8ffb Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Mon, 21 Oct 2024 16:39:59 +0200 Subject: [PATCH 1/5] Updated Support Notes.md --- SECURITY.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 79f6e5cd8fd..a2254e7720a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,12 +2,23 @@ ## Supported Versions -We will provide security updates to the latest major version. +We will provide bug fixes and updates to the latest major version. | Version | Supported | | ------- | ------------------ | -| 12.x | :white_check_mark: | -| < 12.0 | :x: | +| 14.x | :white_check_mark: | +| < 13.0 | :x: | + +## Security Updates + +We will provide security relevant fixes to the following versions: + +| Version | Supported | +| ------- | ------------------ | +| 14.x | :white_check_mark: | +| 13.x | :white_check_mark: | +| 12.x | :white_check_mark: | +| < 12.0 | :x: | ## Reporting a Vulnerability From 6c9d385ad4575e43cad593b2a4257eb699a88f9a Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 22 Oct 2024 23:14:15 +0200 Subject: [PATCH 2/5] Fixed issue that is caused by an internal predicate builder. (#7640) --- .../src/Core/Predicates/DefaultPredicateBuilder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GreenDonut/src/Core/Predicates/DefaultPredicateBuilder.cs b/src/GreenDonut/src/Core/Predicates/DefaultPredicateBuilder.cs index bc80389c66b..a63022d1e8b 100644 --- a/src/GreenDonut/src/Core/Predicates/DefaultPredicateBuilder.cs +++ b/src/GreenDonut/src/Core/Predicates/DefaultPredicateBuilder.cs @@ -3,8 +3,11 @@ namespace GreenDonut.Predicates; +/// +/// A default implementation of the . +/// [Experimental(Experiments.Predicates)] -internal sealed class DefaultPredicateBuilder : IPredicateBuilder +public sealed class DefaultPredicateBuilder : IPredicateBuilder { private List? _predicates; From 7efe6fc8a30e3f6e24caf91ab74f08dcdf613b3a Mon Sep 17 00:00:00 2001 From: Glen Date: Wed, 23 Oct 2024 14:33:29 +0200 Subject: [PATCH 3/5] Updated cspell.json (#7639) --- cspell.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cspell.json b/cspell.json index 2df262a7818..873ab277dd9 100644 --- a/cspell.json +++ b/cspell.json @@ -16,10 +16,7 @@ "*.drawio", "**/bin/", "**/obj/", - "packages.lock.json", - - // TODO: Remove - "**/test/" + "packages.lock.json" ], "ignoreRegExpList": [ "featuredVideoId:(.*)", // video hash From eb2a553675a343a02dcda91c9ff29ff6320f1ffc Mon Sep 17 00:00:00 2001 From: Glen Date: Wed, 23 Oct 2024 14:34:24 +0200 Subject: [PATCH 4/5] Updated the Security section in the v14 blog post (#7637) --- .../2024-08-30-hot-chocolate-14.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/blog/2024-08-30-hot-chocolate-14/2024-08-30-hot-chocolate-14.md b/website/src/blog/2024-08-30-hot-chocolate-14/2024-08-30-hot-chocolate-14.md index 6ab5dba7b75..575ee3ac09a 100644 --- a/website/src/blog/2024-08-30-hot-chocolate-14/2024-08-30-hot-chocolate-14.md +++ b/website/src/blog/2024-08-30-hot-chocolate-14/2024-08-30-hot-chocolate-14.md @@ -878,7 +878,7 @@ Another change we made with Hot Chocolate 14 is around introspection. When we de ```csharp builder .AddGraphQLServer() - .ModifyRequestOptions(o => o.EnableIntrospection = true); + .DisableIntrospection(false); ``` Also the schema file can be disabled like the following. @@ -886,7 +886,7 @@ Also the schema file can be disabled like the following. ```csharp builder .AddGraphQLServer() - .ModifyRequestOptions(o => o.EnableSchemaFile = false); + .ModifyRequestOptions(o => o.EnableSchemaFileSupport = false); ``` # Fusion From aa80b4ad309042395d4e0e424160d388db616274 Mon Sep 17 00:00:00 2001 From: Glen Date: Wed, 23 Oct 2024 14:36:07 +0200 Subject: [PATCH 5/5] Added migration sections for Dependency Injection and Entity Framework (#7634) --- .../v14/migrating/migrate-from-13-to-14.md | 36 +++++++++++++++++++ 1 file changed, 36 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 a1baebbf195..2881e8db11f 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 @@ -44,6 +44,42 @@ Things that have been removed or had a change in behavior that may cause your co | @chillicream/bananacakepop-express-middleware | @chillicream/nitro-express-middleware | | | @chillicream/bananacakepop-graphql-ide | @chillicream/nitro-embedded | `mode: "self"` is now `mode: "embedded"` | +## Dependency injection changes + +- It is no longer necessary to use the `[Service]` attribute unless you're using keyed services, in which case the attribute is used to specify the key. + - Hot Chocolate will identify services automatically. +- Support for the `[FromServices]` attribute has been removed. + - As with the `[Service]` attribute above, this attribute is no longer necessary. +- Since the `RegisterService` method is no longer required, it has been removed, along with the `ServiceKind` enum. +- Scoped services injected into query resolvers are now resolver-scoped by default (not request scoped). For mutation resolvers, services are request-scoped by default. +- The default scope can be changed in two ways: + + 1. Globally, using `ModifyOptions`: + + ```csharp + builder.Services + .AddGraphQLServer() + .ModifyOptions(o => + { + o.DefaultQueryDependencyInjectionScope = + DependencyInjectionScope.Resolver; + o.DefaultMutationDependencyInjectionScope = + DependencyInjectionScope.Request; + }); + ``` + + 2. On a per-resolver basis, with the `[UseRequestScope]` or `[UseResolverScope]` attribute. + - Note: The `[UseServiceScope]` attribute has been removed. + +For more information, see the [Dependency Injection](/docs/hotchocolate/v14/server/dependency-injection) documentation. + +## Entity framework integration changes + +- The `RegisterDbContext` method is no longer required, and has therefore been removed, along with the `DbContextKind` enum. +- Use `RegisterDbContextFactory` to register a DbContext factory. + +For more information, see the [Entity Framework integration](/docs/hotchocolate/v14/integrations/entity-framework) documentation. + ## New GID format This release introduces a more performant GID serializer, which also simplifies the underlying format of globally unique IDs.