]> Dogcows Code - chaz/graphql-client/commitdiff
add more pod fixups
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 16 Mar 2020 00:36:58 +0000 (18:36 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 16 Mar 2020 00:52:41 +0000 (18:52 -0600)
lib/GraphQL/Client.pm
lib/GraphQL/Client/http.pm

index ff8f720cd88d4545f668b79e9c9dd3c5a411d6d5..d2dd652b4dbc75bdc69a259641107eb66b81cc35 100644 (file)
@@ -272,7 +272,8 @@ By default this is automatically constructed based on L</transport_class> or L</
 
 There are two different styles for handling errors.
 
-If L</unpack> is 0 (off), every response -- whether success or failure -- is enveloped like this:
+If L</unpack> 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 {
index 9c89444a632771c56a09c489d0669979c8ff9caa..796e3809bd56e3ecb09280feda0ef393561ab61f 100644 (file)
@@ -175,7 +175,7 @@ __END__
             authorization => 'Bearer s3cr3t',
         },
     };
-    my $response = $client->execute($request, $options);
+    my $response = $transport->execute($request, $options);
 
 =head1 DESCRIPTION
 
This page took 0.024023 seconds and 4 git commands to generate.