You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/docs/hotchocolate/v14/migrating/migrate-from-13-to-14.md
+72-3Lines changed: 72 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,20 @@ builder.Services
88
88
.AddGlobalObjectIdentification();
89
89
```
90
90
91
+
## IIdSerializer replaced by INodeIdSerializer
92
+
93
+
Previously, you could grab the `IIdSerializer` from your dependency injection container to manually parse and serialize globally unique identifiers (GID).
94
+
As part of the changes to the GID format mentioned above, the `IIdSerializer` interface has been renamed to `INodeIdSerializer`.
95
+
96
+
The methods used for parsing and serialization have also been renamed:
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.
104
+
91
105
## Node Resolver validation
92
106
93
107
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.
## DataLoader.LoadAsync always returns nullable type
126
+
127
+
Previously, the `LoadAsync` method on a DataLoader was typed as non-nullable, even though `null` could be returned.
128
+
This release changes the return type of `LoadAsync` to always be nullable.
129
+
103
130
## Builder APIs
104
131
105
132
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.
@@ -108,17 +135,27 @@ We have aligned all builder APIs to be more consistent and easier to use. Builde
108
135
109
136
The interface `IQueryRequestBuilder` and its implementations were replaced with `OperationRequestBuilder` which now supports building standard GraphQL operation requests as well as variable batch requests.
110
137
111
-
The `Build()` method returns now a `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`.
138
+
The `Build()` method now returns a `IOperationRequest` which is implemented by `OperationRequest` and `VariableBatchRequest`.
139
+
140
+
We've also renamed and consolidated some methods on the `OperationRequestBuilder`:
112
141
113
-
We have also simplified what the builder does and removed a lot of the convenience methods that allowed to add single variables to it. This has todo with the support of variable batching. Now, you have to provide the variable map directly.
### IQueryResultBuilder replaced by OperationResultBuilder
116
148
117
149
The interface `IQueryResultBuilder` and its implementations were replaced with `OperationResultBuilder` which produces an `OperationResult` on `Build()`.
118
150
119
151
### IQueryResult replaced by OperationResult
120
152
121
-
The interface `IQueryResultBuilder` and its implementations were replaced with `OperationResultBuilder` which produces an `OperationResult` on `Build()`.
153
+
The interface `IQueryResult` has been replaced by `OperationResult`.
154
+
155
+
### IExecutionResult.ExpectQueryResult replaced by .ExpectOperationResult
156
+
157
+
In your unit tests you might have been using `result.ExpectQueryResult()` to assert that a result is not a streamed response and rather a completed result.
158
+
This assertion method has been renamed to `ExpectOperationResult()`.
122
159
123
160
## Operation complexity analyzer replaced
124
161
@@ -197,6 +234,38 @@ Accessing a keyed service that has not been registered will now throw, instead o
197
234
198
235
This change aligns the API with the regular (non-keyed) service access API.
199
236
237
+
## Connection getTotalCount constructor argument replaced with totalCount
238
+
239
+
Previously, you could supply an async method to the `getTotalCount` constructor argument when instantiating a `Connection<T>`. This method would only be evaluated to calculate the total count, if the `totalCount` field was selected on that Connection in a query.
0 commit comments