Skip to content

Update migration guide with findings#7625

Merged
tobias-tengler merged 5 commits intomainfrom
tte/update-migration-guide
Mar 9, 2026
Merged

Update migration guide with findings#7625
tobias-tengler merged 5 commits intomainfrom
tte/update-migration-guide

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

I've updated some internal services to HotChocolate 14 today and have documented what I've run into during the upgrade that wasn't covered by the migration guide.

@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label Oct 18, 2024
Comment thread website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md Outdated
Comment thread website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md Outdated
@tobias-tengler tobias-tengler force-pushed the tte/update-migration-guide branch from f9650ce to 26f90dc Compare November 17, 2024 10:03
@tobias-tengler tobias-tengler force-pushed the tte/update-migration-guide branch from 26f90dc to 3db6a7c Compare November 27, 2024 09:48
Copilot AI review requested due to automatic review settings March 9, 2026 08:31
@tobias-tengler tobias-tengler merged commit ab53f81 into main Mar 9, 2026
12 of 13 checks passed
@tobias-tengler tobias-tengler deleted the tte/update-migration-guide branch March 9, 2026 08:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Hot Chocolate v14 “migrate from 13 to 14” guide with additional upgrade findings encountered when updating internal services, filling gaps around GID/Node ID serialization, DataLoader nullability, builder APIs, test assertions, and pagination connections.

Changes:

  • Documented IIdSerializerINodeIdSerializer renames and related API/behavior changes.
  • Added notes on DataLoader.LoadAsync becoming always nullable and a new unit-test assertion rename.
  • Documented the Connection<T> constructor change from getTotalCount to totalCount and suggested using [IsSelected] to preserve conditional computation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| Before | After |
| ----------------------------------- | --------------------------------------------------------------------------- |
| `SetQuery("{ __typename }")` | `SetDocument("{ __typename }")` |
| `AddVariableValue("name", "value")` | `AddVariableValues(new Dictionary<string, object?> { ["name"] = "value" })` |
Copy link

Copilot AI Mar 9, 2026

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.

Suggested change
| `AddVariableValue("name", "value")` | `AddVariableValues(new Dictionary<string, object?> { ["name"] = "value" })` |
| `AddVariableValue("name", "value")` | `SetVariableValues(new Dictionary<string, object?> { ["name"] = "value" })` |

Copilot uses AI. Check for mistakes.

The interface `IQueryResult` was replaced with `IOperationResult`.

### IExecutionResult.ExpectQueryResult replaced by .ExpectOperationResult
Copy link

Copilot AI Mar 9, 2026

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.

Suggested change
### IExecutionResult.ExpectQueryResult replaced by .ExpectOperationResult
### IExecutionResult.ExpectQueryResult replaced by IExecutionResult.ExpectOperationResult

Copilot uses AI. Check for mistakes.
| `.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.
Copy link

Copilot AI Mar 9, 2026

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.

Suggested change
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 `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.

Copilot uses AI. Check for mistakes.
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`.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this sentence the article should be "an" (vowel sound) rather than "a": "an IOperationRequest".

Suggested change
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 uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants