diff --git a/website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md b/website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md index 032d0b194de..8707be99413 100644 --- a/website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md +++ b/website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md @@ -204,6 +204,14 @@ public class CustomRequestMiddleware } ``` +## Resolver `Selection` API changes + +In v16, `context.Selection` is a compiled execution selection. The old `context.Selection.SelectionSet` is no longer available. + +- `context.Selection.DeclaringSelectionSet` is the parent selection set (where the current field is declared), not the current field's child selection set. +- `context.Selection.SyntaxNodes` now returns `FieldSelectionNode` wrappers. Use `.Node` to access the underlying `FieldNode`. +- Because selections are merged during operation compilation, one execution selection can map to multiple syntax nodes. + ## OperationResultBuilder is now internal If you've previously used the `OperationResultBuilder` to construct an `OperationResult`, switch to constructing it directly instead: