@spritz-finance/service-client 0.29.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { DocumentNode } from "graphql";
2
+ import type { DocumentNode } from "graphql";
3
3
  interface QueryParams<V = any> {
4
4
  query: DocumentNode;
5
5
  variables?: V;
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GraphClient = void 0;
4
- const graphql_1 = require("graphql");
4
+ // Not the "graphql" index: that loads the whole library (schema, validation,
5
+ // execution) into every service that imports this package. Printing needs only
6
+ // the language module.
7
+ const printer_1 = require("graphql/language/printer");
5
8
  const config_1 = require("./config");
6
9
  const createGraphClient_1 = require("./createGraphClient");
7
10
  class GraphClient {
@@ -14,7 +17,7 @@ class GraphClient {
14
17
  var _a, _b, _c;
15
18
  return this.client
16
19
  .post("", {
17
- query: (0, graphql_1.print)(query),
20
+ query: (0, printer_1.print)(query),
18
21
  variables,
19
22
  operationName: (_c = (_b = (_a = query === null || query === void 0 ? void 0 : query.definitions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.value,
20
23
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "gitHead": "06f8e96b7b38c34df26a38da329331940675e4f8",
5
5
  "description": "Service client",
6
6
  "license": "ISC",