@@ -155,8 +155,8 @@ interface RequestSpec {
155
155
156
156
/**
157
157
* Execute a "subscription" request and return a stream of responses.
158
- * @return a {@code Flux} with a {@code ClientGraphQlResponse} for further
159
- * decoding of the response. The {@code Flux} may terminate as follows:
158
+ * @return a {@code Flux} with responses that provide further options for
159
+ * decoding of each response. The {@code Flux} may terminate as follows:
160
160
* <ul>
161
161
* <li>Completes if the subscription completes before the connection is closed.
162
162
* <li>{@link SubscriptionErrorException} if the subscription ends with an error.
@@ -180,9 +180,10 @@ interface RetrieveSpec {
180
180
/**
181
181
* Decode the field to an entity of the given type.
182
182
* @param entityType the type to convert to
183
- * @return {@code Mono} with the decoded entity, or a
184
- * {@link FieldAccessException} if the target field is not present or
185
- * has no value, checked via {@link ResponseField#hasValue()}.
183
+ * @return {@code Mono} that provides the decoded entity, or completes
184
+ * empty when the field is {@code null} but without errors, or ends with
185
+ * a {@link FieldAccessException} if the target field is not present or
186
+ * has no value.
186
187
*/
187
188
<D > Mono <D > toEntity (Class <D > entityType );
188
189
@@ -194,9 +195,9 @@ interface RetrieveSpec {
194
195
/**
195
196
* Decode the field to a list of entities with the given type.
196
197
* @param elementType the type of elements in the list
197
- * @return {@code Mono} with a list of decoded entities, possibly empty, or
198
- * a {@link FieldAccessException} if the target field is not present or
199
- * has no value, checked via {@link ResponseField#hasValue()}; the stream
198
+ * @return {@code Mono} with a list of decoded entities, possibly an
199
+ * empty list, or ends with {@link FieldAccessException} if the target
200
+ * field is not present or has no value.
200
201
*/
201
202
<D > Mono <List <D >> toEntityList (Class <D > elementType );
202
203
@@ -216,9 +217,11 @@ interface RetrieveSubscriptionSpec {
216
217
/**
217
218
* Decode the field to an entity of the given type.
218
219
* @param entityType the type to convert to
219
- * @return {@code Mono} with the decoded entity, or a
220
+ * @return decoded entities, one for each response, except responses
221
+ * in which the field is {@code null} but without errors, or ending with
220
222
* {@link FieldAccessException} if the target field is not present or
221
- * has no value, checked via {@link ResponseField#hasValue()}.
223
+ * has no value in a given response; the stream may also end with a
224
+ * {@link GraphQlTransportException}.
222
225
*/
223
226
<D > Flux <D > toEntity (Class <D > entityType );
224
227
@@ -230,10 +233,11 @@ interface RetrieveSubscriptionSpec {
230
233
/**
231
234
* Decode the field to a list of entities with the given type.
232
235
* @param elementType the type of elements in the list
233
- * @return lists of decoded entities, possibly empty, or a
236
+ * @return lists of decoded entities, one for each response, except responses
237
+ * in which the field is {@code null} but without errors, or ending with
234
238
* {@link FieldAccessException} if the target field is not present or
235
- * has no value, checked via {@link ResponseField#hasValue()} ; the stream
236
- * may also end with a range of {@link GraphQlTransportException} types .
239
+ * has no value in a given response ; the stream may also end with a
240
+ * {@link GraphQlTransportException}.
237
241
*/
238
242
<D > Flux <List <D >> toEntityList (Class <D > elementType );
239
243
0 commit comments