graphlit-client 1.0.20240418013 → 1.0.20240418014

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.
Files changed (2) hide show
  1. package/dist/client.js +4 -2
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -68,6 +68,7 @@ class Graphlit {
68
68
  throw new Error("Graphlit environment JWT secret is required.");
69
69
  }
70
70
  this.initializeJWT().then(() => {
71
+ console.log(this.token);
71
72
  const httpLink = (0, core_1.createHttpLink)({
72
73
  uri: this.apiUri,
73
74
  });
@@ -83,6 +84,7 @@ class Graphlit {
83
84
  link: authLink.concat(httpLink),
84
85
  cache: new core_1.InMemoryCache(),
85
86
  });
87
+ console.log("Apollo client has been initialized.");
86
88
  });
87
89
  }
88
90
  initializeJWT() {
@@ -421,7 +423,7 @@ class Graphlit {
421
423
  // helper functions
422
424
  mutateAndCheckError(mutation, variables) {
423
425
  return __awaiter(this, void 0, void 0, function* () {
424
- if (!this.client)
426
+ if (this.client === undefined)
425
427
  throw new Error("Apollo Client not configured.");
426
428
  try {
427
429
  const result = yield this.client.mutate({
@@ -446,7 +448,7 @@ class Graphlit {
446
448
  }
447
449
  queryAndCheckError(query, variables) {
448
450
  return __awaiter(this, void 0, void 0, function* () {
449
- if (!this.client)
451
+ if (this.client === undefined)
450
452
  throw new Error("Apollo Client not configured.");
451
453
  try {
452
454
  const result = yield this.client.query({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20240418013",
3
+ "version": "1.0.20240418014",
4
4
  "description": "Graphlit API TypeScript Client",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",