-
-
Notifications
You must be signed in to change notification settings - Fork 803
Update migration guide with findings #7625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9fa3c4f
4fd4ef3
3db6a7c
90bf900
de96cba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -53,7 +53,6 @@ Things that have been removed or had a change in behavior that may cause your co | |||||
| - 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 | ||||||
|
|
@@ -124,6 +123,22 @@ builder.Services | |||||
| .AddGlobalObjectIdentification(); | ||||||
| ``` | ||||||
|
|
||||||
| ## IIdSerializer replaced by INodeIdSerializer | ||||||
|
|
||||||
| Previously, you could grab the `IIdSerializer` from your dependency injection container to manually parse and serialize globally unique identifiers (GID). | ||||||
| As part of the changes to the GID format mentioned above, the `IIdSerializer` interface has been renamed to `INodeIdSerializer`. | ||||||
|
|
||||||
| The methods used for parsing and serialization have also been renamed: | ||||||
|
|
||||||
| | Before | After | | ||||||
| | ---------------------------------- | ---------------------------------------------------------------------------------------- | | ||||||
| | `.Deserialize("<gid-value>")` | `.Parse("<gid-value>", typeof(string))` where `string` is the underlying type of the GID | | ||||||
| | `.Serialize("MyType", "<raw-id>")` | `.Format("MyType", "<raw-id>")` | | ||||||
|
|
||||||
| The `Parse()` (previously `Deserialize()`) method has also changed its return type from `IdValue` to `NodeId`. The parsed Id value can now be accessed through the `NodeId.InternalId` instead of the `IdValue.Value` property. | ||||||
|
|
||||||
| The ability to encode the schema name in the GID via `.Serialize("SchemaName", "MyType", "<raw-id>")` has been dropped and is no longer supported. | ||||||
|
|
||||||
| ## Node Resolver validation | ||||||
|
|
||||||
| We now enforce that each object type implementing the `Node` interface also defines a resolver, so that the object can be refetched through the `node(id: ID!)` field. | ||||||
|
|
@@ -136,6 +151,11 @@ builder.Services | |||||
| .ModifyOptions(o => o.EnsureAllNodesCanBeResolved = false) | ||||||
| ``` | ||||||
|
|
||||||
| ## DataLoader.LoadAsync always returns nullable type | ||||||
|
|
||||||
| Previously, the `LoadAsync` method on a DataLoader was typed as non-nullable, even though `null` could be returned. | ||||||
| This release changes the return type of `LoadAsync` to always be nullable. | ||||||
|
|
||||||
| ## Builder APIs | ||||||
|
|
||||||
| We have aligned all builder APIs to be more consistent and easier to use. Builders can now be created by using the static method `Builder.New()` and the `Build()` method to create the final object. | ||||||
|
|
@@ -144,9 +164,14 @@ We have aligned all builder APIs to be more consistent and easier to use. Builde | |||||
|
|
||||||
| The interface `IQueryRequestBuilder` and its implementations were replaced with `OperationRequestBuilder` which now supports building standard GraphQL operation requests as well as variable batch requests. | ||||||
|
|
||||||
| The `Build()` method returns now a `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`. | ||||||
| The `Build()` method now returns a `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`. | ||||||
|
||||||
| The `Build()` method now returns a `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`. | |
| The `Build()` method now returns an `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`. |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration table lists AddVariableValues(...) as the replacement for AddVariableValue(...), but OperationRequestBuilder exposes SetVariableValues(...) overloads (including one that takes IReadOnlyDictionary<string, object?>). If AddVariableValues is not a real API, please update the table to the correct method name to avoid sending readers to a non-existent API.
| | `AddVariableValue("name", "value")` | `AddVariableValues(new Dictionary<string, object?> { ["name"] = "value" })` | | |
| | `AddVariableValue("name", "value")` | `SetVariableValues(new Dictionary<string, object?> { ["name"] = "value" })` | |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading "IExecutionResult.ExpectQueryResult replaced by .ExpectOperationResult" is a bit inconsistent/ambiguous (leading dot without a receiver/type). Consider renaming it to either "IExecutionResult.ExpectQueryResult replaced by IExecutionResult.ExpectOperationResult" or just "ExpectQueryResult replaced by ExpectOperationResult" for clarity.
| ### IExecutionResult.ExpectQueryResult replaced by .ExpectOperationResult | |
| ### IExecutionResult.ExpectQueryResult replaced by IExecutionResult.ExpectOperationResult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence uses "Id" in "parsed Id value"; elsewhere in the doc the acronym is written as "ID" (e.g., "node(id: ID!)"). Consider changing this to "parsed ID value" for consistency.