From fa1f0d33745578823db4d393dbabe889058bb8c0 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sun, 15 Mar 2020 18:36:58 -0600 Subject: [PATCH] add more pod fixups --- lib/GraphQL/Client.pm | 4 +++- lib/GraphQL/Client/http.pm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.43.0