@@ -243,11 +243,11 @@ interface RetrieveSpec {
243
243
/**
244
244
* Decode the field to an entity of the given type.
245
245
* @param entityType the type to convert to
246
- * @return {@code Mono} with the decoded entity. Completes empty when
247
- * the field is {@code null} without errors, or ends with
248
- * {@link FieldAccessException} for an invalid response or a failed field
249
- * @see GraphQlResponse#isValid()
250
- * @see ResponseField#getError ()
246
+ * @return {@code Mono} with the decoded entity; completes with
247
+ * {@link FieldAccessException} in case of {@link ResponseField field
248
+ * errors} or an {@link GraphQlResponse#isValid() invalid} response;
249
+ * completes empty if the field is {@code null} but has no errors.
250
+ * @see ResponseField#getErrors ()
251
251
*/
252
252
<D > Mono <D > toEntity (Class <D > entityType );
253
253
@@ -257,18 +257,14 @@ interface RetrieveSpec {
257
257
<D > Mono <D > toEntity (ParameterizedTypeReference <D > entityType );
258
258
259
259
/**
260
- * Decode the field to a list of entities with the given type .
260
+ * Variant of {@link #toEntity(Class)} to decode to a List of entities.
261
261
* @param elementType the type of elements in the list
262
- * @return {@code Mono} with a list of decoded entities, possibly an
263
- * empty list, or ends with {@link FieldAccessException} if the target
264
- * field is not present or has no value.
265
- * @see GraphQlResponse#isValid()
266
- * @see ResponseField#getError()
267
262
*/
268
263
<D > Mono <List <D >> toEntityList (Class <D > elementType );
269
264
270
265
/**
271
- * Variant of {@link #toEntityList(Class)} with {@link ParameterizedTypeReference}.
266
+ * Variant of {@link #toEntity(Class)} to decode to a List of entities.
267
+ * @param elementType the type of elements in the list
272
268
*/
273
269
<D > Mono <List <D >> toEntityList (ParameterizedTypeReference <D > elementType );
274
270
@@ -283,12 +279,11 @@ interface RetrieveSubscriptionSpec {
283
279
/**
284
280
* Decode the field to an entity of the given type.
285
281
* @param entityType the type to convert to
286
- * @return a stream of decoded entities, one for each response, excluding
287
- * responses in which the field is {@code null} without errors. Ends with
288
- * {@link FieldAccessException} for an invalid response or a failed field.
289
- * May also end with a {@link GraphQlTransportException}.
290
- * @see GraphQlResponse#isValid()
291
- * @see ResponseField#getError()
282
+ * @return {@code Mono} with the decoded entity; completes with
283
+ * {@link FieldAccessException} in case of {@link ResponseField field
284
+ * errors} or an {@link GraphQlResponse#isValid() invalid} response;
285
+ * completes empty if the field is {@code null} but has no errors.
286
+ * @see ResponseField#getErrors()
292
287
*/
293
288
<D > Flux <D > toEntity (Class <D > entityType );
294
289
@@ -298,19 +293,13 @@ interface RetrieveSubscriptionSpec {
298
293
<D > Flux <D > toEntity (ParameterizedTypeReference <D > entityType );
299
294
300
295
/**
301
- * Decode the field to a list of entities with the given type .
296
+ * Variant of {@link #toEntity(Class)} to decode each response to a List of entities .
302
297
* @param elementType the type of elements in the list
303
- * @return lists of decoded entities, one for each response, excluding
304
- * responses in which the field is {@code null} without errors. Ends with
305
- * {@link FieldAccessException} for an invalid response or a failed field.
306
- * May also end with a {@link GraphQlTransportException}.
307
- * @see GraphQlResponse#isValid()
308
- * @see ResponseField#getError()
309
298
*/
310
299
<D > Flux <List <D >> toEntityList (Class <D > elementType );
311
300
312
301
/**
313
- * Variant of {@link #toEntityList (Class)} with {@link ParameterizedTypeReference} .
302
+ * Variant of {@link #toEntity (Class)} to decode each response to a List of entities .
314
303
*/
315
304
<D > Flux <List <D >> toEntityList (ParameterizedTypeReference <D > elementType );
316
305
0 commit comments