adaptic-backend 1.0.260 → 1.0.262
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/client.cjs +6 -4
- package/client.d.ts +2 -1
- package/package.json +1 -1
- package/server/client.d.ts +2 -1
- package/server/client.d.ts.map +1 -1
- package/server/client.js.map +1 -1
- package/server/client.mjs +3 -2
package/client.cjs
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.client = void 0;
|
4
4
|
exports.getApolloClient = getApolloClient;
|
5
|
-
const
|
5
|
+
const core_cjs_1 = require("@apollo/client/core/core.cjs");
|
6
|
+
const cache_cjs_1 = require("@apollo/client/cache/cache.cjs");
|
7
|
+
const http_cjs_1 = require("@apollo/client/link/http/http.cjs");
|
6
8
|
const context_cjs_1 = require("@apollo/client/link/context/context.cjs");
|
7
9
|
const error_cjs_1 = require("@apollo/client/link/error/error.cjs");
|
8
10
|
let apolloClient = null;
|
@@ -15,7 +17,7 @@ function initializeApollo() {
|
|
15
17
|
const httpUrl = isProduction
|
16
18
|
? process.env.BACKEND_HTTPS_URL || "https://api.adaptic.ai/graphql"
|
17
19
|
: "http://localhost:4000/graphql";
|
18
|
-
const httpLink = new
|
20
|
+
const httpLink = new http_cjs_1.HttpLink({ uri: httpUrl, fetch });
|
19
21
|
const authLink = (0, context_cjs_1.setContext)((_, { headers }) => {
|
20
22
|
// Retrieve the token from environment variables or other secure storage
|
21
23
|
const token = process.env.SERVER_AUTH_TOKEN || "";
|
@@ -35,9 +37,9 @@ function initializeApollo() {
|
|
35
37
|
console.error(`[Network error]: ${networkError}`);
|
36
38
|
}
|
37
39
|
});
|
38
|
-
return new
|
40
|
+
return new core_cjs_1.ApolloClient({
|
39
41
|
link: errorLink.concat(authLink.concat(httpLink)),
|
40
|
-
cache: new
|
42
|
+
cache: new cache_cjs_1.InMemoryCache(),
|
41
43
|
});
|
42
44
|
}
|
43
45
|
/**
|
package/client.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { ApolloClient
|
1
|
+
import { ApolloClient } from "@apollo/client/core/core.cjs";
|
2
|
+
import { NormalizedCacheObject } from "@apollo/client/cache/inmemory/types.js";
|
2
3
|
/**
|
3
4
|
* Retrieves the singleton Apollo Client instance.
|
4
5
|
* @returns ApolloClient instance.
|
package/package.json
CHANGED
package/server/client.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { ApolloClient
|
1
|
+
import { ApolloClient } from "@apollo/client/core/core.cjs";
|
2
|
+
import { NormalizedCacheObject } from "@apollo/client/cache/inmemory/types.js";
|
2
3
|
/**
|
3
4
|
* Retrieves the singleton Apollo Client instance.
|
4
5
|
* @returns ApolloClient instance.
|
package/server/client.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAmD/E;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAAC,qBAAqB,CAAC,CAKrE;AAGD,eAAO,MAAM,MAAM,qCAAoB,CAAC"}
|
package/server/client.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,EAA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CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,YAAY,CAAC;QACtB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACjD,KAAK,EAAE,IAAI,aAAa,EAAE;KAC3B,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,gBAAgB,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,gCAAgC;AAChC,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC"}
|
package/server/client.mjs
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import { ApolloClient } from "@apollo/client/core/core.cjs";
|
2
|
+
import { InMemoryCache } from "@apollo/client/cache/cache.cjs";
|
3
|
+
import { HttpLink } from "@apollo/client/link/http/http.cjs";
|
3
4
|
import { setContext } from "@apollo/client/link/context/context.cjs";
|
4
5
|
import { onError } from "@apollo/client/link/error/error.cjs";
|
5
6
|
let apolloClient = null;
|