]> Dogcows Code - chaz/graphql-client/commitdiff
Release GraphQL-Client 0.601 v0.601
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 16 Mar 2020 02:39:57 +0000 (20:39 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 16 Mar 2020 02:39:57 +0000 (20:39 -0600)
  * Rename "class" attribute to "transport_class".
  * Minor pod fixups.

Changes
README.md

diff --git a/Changes b/Changes
index ede43171dae9603af5bb9d2ff997ce587ddb735b..935c49acad15e35ee57361000a2f53ba5e0ee401 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,10 @@ Revision history for GraphQL-Client.
 
 {{$NEXT}}
 
+0.601     2020-03-15 20:38:38-06:00 MST7MDT
+  * Rename "class" attribute to "transport_class".
+  * Minor pod fixups.
+
 0.600     2020-03-15 18:08:57-06:00 MST7MDT
-  * Initial public release
+  * Initial public release.
 
index 5f4df5bf6f1a74313a74621c0120c8c3ee17ddd0..835afeec9d3540f7d989d27cd985769084c745be 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ GraphQL::Client - A GraphQL client
 
 # VERSION
 
-version 0.600
+version 0.601
 
 # SYNOPSIS
 
@@ -52,7 +52,7 @@ version 0.600
 `GraphQL::Client` provides a simple way to execute [GraphQL](https://graphql.org/) queries and
 mutations on a server.
 
-This module is the programmatic interface. There is also a [graphql](#cli-program).
+This module is the programmatic interface. There is also a ["CLI program"](https://metacpan.org/pod/graphql).
 
 GraphQL servers are usually served over HTTP. The provided transport, [GraphQL::Client::http](https://metacpan.org/pod/GraphQL%3A%3AClient%3A%3Ahttp), lets
 you plug in your own user agent, so this client works naturally with [HTTP::Tiny](https://metacpan.org/pod/HTTP%3A%3ATiny),
@@ -64,25 +64,25 @@ you plug in your own user agent, so this client works naturally with [HTTP::Tiny
 
 The URL of a GraphQL endpoint, e.g. `"http://myapiserver/graphql"`.
 
-## class
+## unpack
 
-The package name of a transport.
+Whether or not to "unpack" the response, which enables a different style for error-handling.
 
-By default this is automatically determined from the protocol portion of the ["url"](#url).
+Default is 0.
 
-## transport
+See ["ERROR HANDLING"](#error-handling).
 
-The transport object.
+## transport\_class
 
-By default this is automatically constructed based on the ["class"](#class).
+The package name of a transport.
 
-## unpack
+This is optional if the correct transport can be correctly determined from the ["url"](#url).
 
-Whether or not to "unpack" the response, which enables a different style for error-handling.
+## transport
 
-Default is 0.
+The transport object.
 
-See ["ERROR HANDLING"](#error-handling).
+By default this is automatically constructed based on ["transport\_class"](#transport_class) or ["url"](#url).
 
 # METHODS
 
@@ -122,7 +122,8 @@ Note: Setting the ["unpack"](#unpack) attribute affects the response shape.
 
 There are two different styles for handling errors.
 
-If ["unpack"](#unpack) is 0 (off), every response -- whether success or failure -- is enveloped like this:
+If ["unpack"](#unpack) is 0 (off, the default), every response -- whether success or failure -- is enveloped
+like this:
 
     {
         data   => {...},
@@ -148,6 +149,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 {
This page took 0.024907 seconds and 4 git commands to generate.