Dancer2-Plugin-GraphQL

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/GraphQL.pm  view on Meta::CPAN

        'Content-Type': 'application/json'
      };
      var extra_headers = JSON.parse(
        parameters.headers || localStorage.getItem('graphiql:headers') || '{ }'
      );
      Object.assign(headers, extra_headers);
      return fetch(fetchURL, {
        method: 'post',
        headers: headers,
        body: JSON.stringify(graphQLParams),
        credentials: 'include',
      }).then(function (response) {
        return response.text();
      }).then(function (responseBody) {
        try {
          return JSON.parse(responseBody);
        } catch (error) {
          return responseBody;
        }
      });
    }



( run in 0.230 second using v1.01-cache-2.11-cpan-4d50c553e7e )