@graphql-tools/url-loader 7.16.13 → 7.16.14
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/cjs/index.js +6 -2
- package/esm/index.js +6 -2
- package/package.json +4 -4
- package/typings/index.d.cts +2 -2
- package/typings/index.d.ts +2 -2
package/cjs/index.js
CHANGED
|
@@ -53,12 +53,16 @@ function isCompatibleUri(uri) {
|
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
55
|
class UrlLoader {
|
|
56
|
-
buildHTTPExecutor(initialEndpoint,
|
|
56
|
+
buildHTTPExecutor(initialEndpoint, fetchFn, options) {
|
|
57
57
|
const HTTP_URL = switchProtocols(initialEndpoint, {
|
|
58
58
|
wss: 'https',
|
|
59
59
|
ws: 'http',
|
|
60
60
|
});
|
|
61
|
-
return (0, executor_http_1.buildHTTPExecutor)(
|
|
61
|
+
return (0, executor_http_1.buildHTTPExecutor)({
|
|
62
|
+
endpoint: HTTP_URL,
|
|
63
|
+
fetch: fetchFn,
|
|
64
|
+
...options,
|
|
65
|
+
});
|
|
62
66
|
}
|
|
63
67
|
buildWSExecutor(subscriptionsEndpoint, webSocketImpl, connectionParams) {
|
|
64
68
|
const WS_URL = switchProtocols(subscriptionsEndpoint, {
|
package/esm/index.js
CHANGED
|
@@ -49,12 +49,16 @@ function isCompatibleUri(uri) {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export class UrlLoader {
|
|
52
|
-
buildHTTPExecutor(initialEndpoint,
|
|
52
|
+
buildHTTPExecutor(initialEndpoint, fetchFn, options) {
|
|
53
53
|
const HTTP_URL = switchProtocols(initialEndpoint, {
|
|
54
54
|
wss: 'https',
|
|
55
55
|
ws: 'http',
|
|
56
56
|
});
|
|
57
|
-
return buildHTTPExecutor(
|
|
57
|
+
return buildHTTPExecutor({
|
|
58
|
+
endpoint: HTTP_URL,
|
|
59
|
+
fetch: fetchFn,
|
|
60
|
+
...options,
|
|
61
|
+
});
|
|
58
62
|
}
|
|
59
63
|
buildWSExecutor(subscriptionsEndpoint, webSocketImpl, connectionParams) {
|
|
60
64
|
const WS_URL = switchProtocols(subscriptionsEndpoint, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/url-loader",
|
|
3
|
-
"version": "7.16.
|
|
3
|
+
"version": "7.16.14",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-tools/delegate": "9.0.15",
|
|
11
|
-
"@graphql-tools/executor-http": "0.0.
|
|
12
|
-
"@graphql-tools/executor-graphql-ws": "0.0.
|
|
13
|
-
"@graphql-tools/executor-legacy-ws": "0.0.
|
|
11
|
+
"@graphql-tools/executor-http": "0.0.2",
|
|
12
|
+
"@graphql-tools/executor-graphql-ws": "0.0.2",
|
|
13
|
+
"@graphql-tools/executor-legacy-ws": "0.0.2",
|
|
14
14
|
"@graphql-tools/utils": "9.1.0",
|
|
15
15
|
"@graphql-tools/wrap": "9.2.11",
|
|
16
16
|
"@ardatan/sync-fetch": "0.0.1",
|
package/typings/index.d.cts
CHANGED
|
@@ -78,8 +78,8 @@ export interface LoadFromUrlOptions extends BaseLoaderOptions, Partial<Introspec
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
export declare class UrlLoader implements Loader<LoadFromUrlOptions> {
|
|
81
|
-
buildHTTPExecutor(endpoint: string,
|
|
82
|
-
buildHTTPExecutor(endpoint: string,
|
|
81
|
+
buildHTTPExecutor(endpoint: string, fetchFn: SyncFetchFn, options?: LoadFromUrlOptions): SyncExecutor<any, ExecutionExtensions>;
|
|
82
|
+
buildHTTPExecutor(endpoint: string, fetchFn: AsyncFetchFn, options?: LoadFromUrlOptions): AsyncExecutor<any, ExecutionExtensions>;
|
|
83
83
|
buildWSExecutor(subscriptionsEndpoint: string, webSocketImpl: typeof WebSocket, connectionParams?: Record<string, any>): Executor;
|
|
84
84
|
buildWSLegacyExecutor(subscriptionsEndpoint: string, WebSocketImpl: typeof WebSocket, options?: LoadFromUrlOptions): Executor;
|
|
85
85
|
getFetch(customFetch: LoadFromUrlOptions['customFetch'], importFn: AsyncImportFn): PromiseLike<AsyncFetchFn> | AsyncFetchFn;
|
package/typings/index.d.ts
CHANGED
|
@@ -78,8 +78,8 @@ export interface LoadFromUrlOptions extends BaseLoaderOptions, Partial<Introspec
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
export declare class UrlLoader implements Loader<LoadFromUrlOptions> {
|
|
81
|
-
buildHTTPExecutor(endpoint: string,
|
|
82
|
-
buildHTTPExecutor(endpoint: string,
|
|
81
|
+
buildHTTPExecutor(endpoint: string, fetchFn: SyncFetchFn, options?: LoadFromUrlOptions): SyncExecutor<any, ExecutionExtensions>;
|
|
82
|
+
buildHTTPExecutor(endpoint: string, fetchFn: AsyncFetchFn, options?: LoadFromUrlOptions): AsyncExecutor<any, ExecutionExtensions>;
|
|
83
83
|
buildWSExecutor(subscriptionsEndpoint: string, webSocketImpl: typeof WebSocket, connectionParams?: Record<string, any>): Executor;
|
|
84
84
|
buildWSLegacyExecutor(subscriptionsEndpoint: string, WebSocketImpl: typeof WebSocket, options?: LoadFromUrlOptions): Executor;
|
|
85
85
|
getFetch(customFetch: LoadFromUrlOptions['customFetch'], importFn: AsyncImportFn): PromiseLike<AsyncFetchFn> | AsyncFetchFn;
|