graphlit-client 1.0.20250127001 → 1.0.20250130001

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.
package/dist/client.d.ts CHANGED
@@ -257,6 +257,7 @@ declare class Graphlit {
257
257
  createObservation(observation: Types.ObservationInput): Promise<Types.CreateObservationMutation>;
258
258
  updateObservation(observation: Types.ObservationUpdateInput): Promise<Types.UpdateObservationMutation>;
259
259
  deleteObservation(id: string): Promise<Types.DeleteObservationMutation>;
260
+ private prettyPrintGraphQLError;
260
261
  private mutateAndCheckError;
261
262
  private queryAndCheckError;
262
263
  }
package/dist/client.js CHANGED
@@ -1344,6 +1344,22 @@ class Graphlit {
1344
1344
  });
1345
1345
  }
1346
1346
  // helper functions
1347
+ prettyPrintGraphQLError(err) {
1348
+ if (!err)
1349
+ return 'Unknown error';
1350
+ const parts = [];
1351
+ // Add the base error message
1352
+ parts.push(err.message);
1353
+ // Add location info if available
1354
+ if (err.locations && err.locations.length > 0) {
1355
+ parts.push(`at line ${err.locations[0].line}, column ${err.locations[0].column}`);
1356
+ }
1357
+ // Add path info if available
1358
+ if (err.path) {
1359
+ parts.push(`\n- Path: ${err.path.join('.')}`);
1360
+ }
1361
+ return parts.join(' ');
1362
+ }
1347
1363
  mutateAndCheckError(mutation, variables) {
1348
1364
  return __awaiter(this, void 0, void 0, function* () {
1349
1365
  if (this.client === undefined)
@@ -1354,7 +1370,7 @@ class Graphlit {
1354
1370
  variables: variables || {}
1355
1371
  });
1356
1372
  if (result.errors) {
1357
- const errorMessage = result.errors.map(err => err.message).join("\n");
1373
+ const errorMessage = result.errors.map(err => this.prettyPrintGraphQLError(err)).join("\n");
1358
1374
  throw new Error(errorMessage);
1359
1375
  }
1360
1376
  if (!result.data) {
@@ -1364,7 +1380,7 @@ class Graphlit {
1364
1380
  }
1365
1381
  catch (error) {
1366
1382
  if (error instanceof core_1.ApolloError && error.graphQLErrors.length > 0) {
1367
- const errorMessage = error.graphQLErrors.map(err => err.message).join("\n");
1383
+ const errorMessage = error.graphQLErrors.map(err => this.prettyPrintGraphQLError(err)).join("\n");
1368
1384
  console.error(errorMessage);
1369
1385
  throw new Error(errorMessage);
1370
1386
  }
@@ -1388,7 +1404,7 @@ class Graphlit {
1388
1404
  variables: variables || {}
1389
1405
  });
1390
1406
  if (result.errors) {
1391
- const errorMessage = result.errors.map(err => err.message).join("\n");
1407
+ const errorMessage = result.errors.map(err => this.prettyPrintGraphQLError(err)).join("\n");
1392
1408
  throw new Error(errorMessage);
1393
1409
  }
1394
1410
  if (!result.data) {
@@ -1398,7 +1414,7 @@ class Graphlit {
1398
1414
  }
1399
1415
  catch (error) {
1400
1416
  if (error instanceof core_1.ApolloError && error.graphQLErrors.length > 0) {
1401
- const errorMessage = error.graphQLErrors.map(err => err.message).join("\n");
1417
+ const errorMessage = error.graphQLErrors.map(err => this.prettyPrintGraphQLError(err)).join("\n");
1402
1418
  console.error(errorMessage);
1403
1419
  throw new Error(errorMessage);
1404
1420
  }
@@ -4099,7 +4099,9 @@ export declare enum GoogleModels {
4099
4099
  /** Gemini 2.0 Flash (Experimental) */
4100
4100
  Gemini_2_0FlashExperimental = "GEMINI_2_0_FLASH_EXPERIMENTAL",
4101
4101
  /** Gemini 2.0 Flash Thinking (Experimental) */
4102
- Gemini_2_0FlashThinkingExperimental = "GEMINI_2_0_FLASH_THINKING_EXPERIMENTAL"
4102
+ Gemini_2_0FlashThinkingExperimental = "GEMINI_2_0_FLASH_THINKING_EXPERIMENTAL",
4103
+ /** Gemini 2.0 Pro (Experimental) */
4104
+ Gemini_2_0ProExperimental = "GEMINI_2_0_PRO_EXPERIMENTAL"
4103
4105
  }
4104
4106
  /** Represents a knowledge graph. */
4105
4107
  export type Graph = {
@@ -4230,6 +4232,8 @@ export type GroqModelPropertiesUpdateInput = {
4230
4232
  export declare enum GroqModels {
4231
4233
  /** Developer-specified model */
4232
4234
  Custom = "CUSTOM",
4235
+ /** Deepseek R1 Distill Llama 70b Preview */
4236
+ DeepseekR1Llama_70BPreview = "DEEPSEEK_R1_LLAMA_70B_PREVIEW",
4233
4237
  /** LLaMA 3.1 8b */
4234
4238
  Llama_3_1_8B = "LLAMA_3_1_8B",
4235
4239
  /** LLaMA 3.2 1b Preview */
@@ -812,6 +812,8 @@ var GoogleModels;
812
812
  GoogleModels["Gemini_2_0FlashExperimental"] = "GEMINI_2_0_FLASH_EXPERIMENTAL";
813
813
  /** Gemini 2.0 Flash Thinking (Experimental) */
814
814
  GoogleModels["Gemini_2_0FlashThinkingExperimental"] = "GEMINI_2_0_FLASH_THINKING_EXPERIMENTAL";
815
+ /** Gemini 2.0 Pro (Experimental) */
816
+ GoogleModels["Gemini_2_0ProExperimental"] = "GEMINI_2_0_PRO_EXPERIMENTAL";
815
817
  })(GoogleModels || (exports.GoogleModels = GoogleModels = {}));
816
818
  /** GraphRAG strategies */
817
819
  var GraphStrategyTypes;
@@ -828,6 +830,8 @@ var GroqModels;
828
830
  (function (GroqModels) {
829
831
  /** Developer-specified model */
830
832
  GroqModels["Custom"] = "CUSTOM";
833
+ /** Deepseek R1 Distill Llama 70b Preview */
834
+ GroqModels["DeepseekR1Llama_70BPreview"] = "DEEPSEEK_R1_LLAMA_70B_PREVIEW";
831
835
  /** LLaMA 3.1 8b */
832
836
  GroqModels["Llama_3_1_8B"] = "LLAMA_3_1_8B";
833
837
  /** LLaMA 3.2 1b Preview */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250127001",
3
+ "version": "1.0.20250130001",
4
4
  "description": "Graphlit API TypeScript Client",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",