Skip to content

[Docs] Update v16 migration guide#9123

Merged
tobias-tengler merged 1 commit intomainfrom
tte/update-migration-guide-2
Feb 17, 2026
Merged

[Docs] Update v16 migration guide#9123
tobias-tengler merged 1 commit intomainfrom
tte/update-migration-guide-2

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 15:15
@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label Feb 17, 2026
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 HotChocolate v16 migration guide to document breaking changes around OperationResult construction/mutation and a rename in runtime type abstractions.

Changes:

  • Added guidance for replacing usages of OperationResultBuilder (now internal) with direct OperationResult construction and immutable updates.
  • Documented OperationResult API changes (removal of IOperationResult, non-null Errors/Extensions).
  • Added note about renaming IHasRuntimeType to IRuntimeTypeProvider.

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

Comment on lines +185 to +190
```csharp
var errors = ImmutableList.Create<IError>([]);
var extensions = ImmutableOrderedDictionary.Create([]);

context.Result = new OperationResult(errors, extensions);
```
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The sample constructs an OperationResult with empty errors and empty extensions. In v16 OperationResult(ImmutableList<IError> errors, ...) throws when errors.Count == 0, and the other constructor also rejects having no data + no errors + no extensions. Update the snippet to show a valid construction (e.g., provide at least one error, or create the result with non-empty extensions, or include data).

Copilot uses AI. Check for mistakes.

```csharp
var errors = ImmutableList.Create<IError>([]);
var extensions = ImmutableOrderedDictionary.Create([]);
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

ImmutableOrderedDictionary.Create([]) will not compile as written because the generic type arguments cannot be inferred from an empty collection expression. Use ImmutableOrderedDictionary<string, object?>.Empty or specify the generic arguments explicitly (e.g., Create<string, object?>(...)).

Suggested change
var extensions = ImmutableOrderedDictionary.Create([]);
var extensions = ImmutableOrderedDictionary<string, object?>.Empty;

Copilot uses AI. Check for mistakes.
}
```

Most of the properties you'd want to modify are now immutable data structures that can be modified.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

This sentence reads self-contradictory: “immutable data structures that can be modified.” Consider clarifying that these are immutable collections updated via non-destructive operations (e.g., SetItem returns a new instance) to avoid confusion for readers.

Suggested change
Most of the properties you'd want to modify are now immutable data structures that can be modified.
Most of the properties you'd want to change now expose immutable collection types; use their non-destructive update methods (for example, `SetItem` returns a new instance) and assign the returned value back to the property.

Copilot uses AI. Check for mistakes.
Comment thread website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md Outdated
@tobias-tengler tobias-tengler force-pushed the tte/update-migration-guide-2 branch from 6499651 to 3eeaba6 Compare February 17, 2026 15:30
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
2912.81 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.81ms 15.01ms 171.70ms 16.94ms 30.90ms 36.37ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
3313.93 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.67ms 66.70ms 230.14ms 67.22ms 123.25ms 138.76ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
      }
    }
  }
}

Deep Recursion Query

Constant Load (50 VUs)

Requests/sec Error Rate
745.58 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
8.82ms 62.21ms 389.74ms 65.50ms 81.41ms 90.24ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
810.01 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
1.86ms 256.20ms 708.86ms 264.67ms 526.92ms 566.42ms

Executed Query

fragment User on User {
  id
  username
  name
}

fragment Review on Review {
  id
  body
}

fragment Product on Product {
  inStock
  name
  price
  shippingEstimate
  upc
  weight
}

query TestQuery {
  users {
    ...User
    reviews {
      ...Review
      product {
        ...Product
        reviews {
          ...Review
          author {
            ...User
            reviews {
              ...Review
              product {
                ...Product
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    ...Product
    reviews {
      ...Review
      author {
        ...User
        reviews {
          ...Review
          product {
            ...Product
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
23779.87 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.10ms 1.69ms 52.89ms 2.05ms 3.91ms 4.79ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18930.07 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.10ms 9.16ms 116.36ms 11.16ms 22.98ms 27.70ms

Executed Query

query TestQuery_8f7a46ce_2(
  $__fusion_1_upc: ID!
  $__fusion_2_price: Long!
  $__fusion_2_weight: Long!
) {
  productByUpc(upc: $__fusion_1_upc) {
    inStock
    shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
  }
}

Variables (5 sets batched in single request)

[
  { "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
  { "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
  { "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
  { "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]

No baseline data available for comparison.


Run 22104598531 • Commit 11f7e10 • Tue, 17 Feb 2026 15:49:18 GMT

@tobias-tengler tobias-tengler merged commit 0378a17 into main Feb 17, 2026
12 checks passed
@tobias-tengler tobias-tengler deleted the tte/update-migration-guide-2 branch February 17, 2026 16:11
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.

2 participants