Skip to content

Commit a588dd5

Browse files
committed
Update Javadoc on GraphQlClient#retrieve
Closes gh-434
1 parent 2e22dce commit a588dd5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

spring-graphql/src/main/java/org/springframework/graphql/client/GraphQlClient.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,24 @@ interface RequestSpec {
185185
RequestSpec attributes(Consumer<Map<String, Object>> attributesConsumer);
186186

187187
/**
188-
* Shortcut for {@link #execute()} with a single field path to decode from.
188+
* Shortcut for {@link #execute()} with a field path to decode from.
189+
* <p>If you want to decode the full data instead, use {@link #execute()}:
190+
* <pre>
191+
* client.document("..").execute().map(response -> response.toEntity(..))
192+
* </pre>
189193
* @return a spec with decoding options
190194
* @throws FieldAccessException if the target field has any errors,
191195
* including nested errors.
192196
*/
193197
RetrieveSpec retrieve(String path);
194198

195199
/**
196-
* Shortcut for {@link #executeSubscription()} with a single field path to decode from.
200+
* Shortcut for {@link #executeSubscription()} with a field path to
201+
* decode from for each result.
202+
* <p>If you want to decode the full data, use {@link #executeSubscription()}:
203+
* <pre>
204+
* client.document("..").executeSubscription().map(response -> response.toEntity(..))
205+
* </pre>
197206
* @return a spec with decoding options
198207
*/
199208
RetrieveSubscriptionSpec retrieveSubscription(String path);

0 commit comments

Comments
 (0)