From a588dd5c5b6acb6a8835b19a96e18ded67655836 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Tue, 19 Jul 2022 16:23:15 +0100 Subject: [PATCH] Update Javadoc on GraphQlClient#retrieve Closes gh-434 --- .../graphql/client/GraphQlClient.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/spring-graphql/src/main/java/org/springframework/graphql/client/GraphQlClient.java b/spring-graphql/src/main/java/org/springframework/graphql/client/GraphQlClient.java index 42c6e49d..e73a5d42 100644 --- a/spring-graphql/src/main/java/org/springframework/graphql/client/GraphQlClient.java +++ b/spring-graphql/src/main/java/org/springframework/graphql/client/GraphQlClient.java @@ -185,7 +185,11 @@ public interface GraphQlClient { RequestSpec attributes(Consumer> attributesConsumer); /** - * Shortcut for {@link #execute()} with a single field path to decode from. + * Shortcut for {@link #execute()} with a field path to decode from. + *

If you want to decode the full data instead, use {@link #execute()}: + *

+		 * client.document("..").execute().map(response -> response.toEntity(..))
+		 * 
* @return a spec with decoding options * @throws FieldAccessException if the target field has any errors, * including nested errors. @@ -193,7 +197,12 @@ public interface GraphQlClient { RetrieveSpec retrieve(String path); /** - * Shortcut for {@link #executeSubscription()} with a single field path to decode from. + * Shortcut for {@link #executeSubscription()} with a field path to + * decode from for each result. + *

If you want to decode the full data, use {@link #executeSubscription()}: + *

+		 * client.document("..").executeSubscription().map(response -> response.toEntity(..))
+		 * 
* @return a spec with decoding options */ RetrieveSubscriptionSpec retrieveSubscription(String path);