graphlit-client 1.0.20250611001 → 1.0.20250611003
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 +3 -2
- package/dist/client.js +11 -3
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
|
1
|
+
export declare const ApolloClient: any, InMemoryCache: any, createHttpLink: any, ApolloLink: any;
|
2
|
+
import type { ApolloClient as ApolloClientType, NormalizedCacheObject } from "@apollo/client";
|
2
3
|
import * as Types from "./generated/graphql-types.js";
|
3
4
|
import { AgentOptions, AgentResult, StreamAgentOptions, ToolHandler } from "./types/agent.js";
|
4
5
|
import { AgentStreamEvent } from "./types/ui-events.js";
|
5
6
|
export type { AgentOptions, AgentResult, StreamAgentOptions, ToolCallResult, UsageInfo, AgentError, } from "./types/agent.js";
|
6
7
|
export type { AgentStreamEvent } from "./types/ui-events.js";
|
7
8
|
declare class Graphlit {
|
8
|
-
client:
|
9
|
+
client: ApolloClientType<NormalizedCacheObject> | undefined;
|
9
10
|
token: string | undefined;
|
10
11
|
private apiUri;
|
11
12
|
private organizationId;
|
package/dist/client.js
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
// Runtime import via createRequire
|
2
|
+
import { createRequire } from "node:module";
|
3
|
+
const require = createRequire(import.meta.url);
|
4
|
+
const apollo = require("@apollo/client");
|
5
|
+
// Runtime value import
|
6
|
+
const { ApolloError } = require("@apollo/client/core/core.cjs");
|
7
|
+
export const { ApolloClient, InMemoryCache, createHttpLink, ApolloLink } = apollo;
|
1
8
|
import * as jwt from "jsonwebtoken";
|
2
|
-
import { ApolloClient, InMemoryCache, createHttpLink, ApolloLink, ApolloError, } from "@apollo/client";
|
3
9
|
import * as Types from "./generated/graphql-types.js";
|
4
10
|
import * as Documents from "./generated/graphql-documents.js";
|
5
11
|
import * as dotenv from "dotenv";
|
@@ -2061,7 +2067,8 @@ class Graphlit {
|
|
2061
2067
|
return result.data;
|
2062
2068
|
}
|
2063
2069
|
catch (error) {
|
2064
|
-
if (error instanceof ApolloError &&
|
2070
|
+
if (error instanceof ApolloError &&
|
2071
|
+
error.graphQLErrors.length > 0) {
|
2065
2072
|
const errorMessage = error.graphQLErrors
|
2066
2073
|
.map((err) => this.prettyPrintGraphQLError(err))
|
2067
2074
|
.join("\n");
|
@@ -2097,7 +2104,8 @@ class Graphlit {
|
|
2097
2104
|
return result.data;
|
2098
2105
|
}
|
2099
2106
|
catch (error) {
|
2100
|
-
if (error instanceof ApolloError &&
|
2107
|
+
if (error instanceof ApolloError &&
|
2108
|
+
error.graphQLErrors.length > 0) {
|
2101
2109
|
const errorMessage = error.graphQLErrors
|
2102
2110
|
.map((err) => this.prettyPrintGraphQLError(err))
|
2103
2111
|
.join("\n");
|