From: Charles McGarvey Date: Mon, 16 Mar 2020 00:36:58 +0000 (-0600) Subject: add more pod fixups X-Git-Tag: v0.601~1 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=fa1f0d33745578823db4d393dbabe889058bb8c0;p=chaz%2Fgraphql-client add more pod fixups --- diff --git a/lib/GraphQL/Client.pm b/lib/GraphQL/Client.pm index ff8f720..d2dd652 100644 --- a/lib/GraphQL/Client.pm +++ b/lib/GraphQL/Client.pm @@ -272,7 +272,8 @@ By default this is automatically constructed based on L or L is 0 (off), every response -- whether success or failure -- is enveloped like this: +If L is 0 (off, the default), every response -- whether success or failure -- is enveloped +like this: { data => {...}, @@ -298,6 +299,7 @@ otherwise it will throw an exception. So your code would instead look like this: my $data = eval { $graphql->execute(...) }; if (my $error = $@) { + my $resp = $error->{response}; # handle errors } else { diff --git a/lib/GraphQL/Client/http.pm b/lib/GraphQL/Client/http.pm index 9c89444..796e380 100644 --- a/lib/GraphQL/Client/http.pm +++ b/lib/GraphQL/Client/http.pm @@ -175,7 +175,7 @@ __END__ authorization => 'Bearer s3cr3t', }, }; - my $response = $client->execute($request, $options); + my $response = $transport->execute($request, $options); =head1 DESCRIPTION