@graphql-hive/yoga 0.43.1 → 0.44.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2
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 +13 -6
- package/cjs/version.js +1 -1
- package/esm/index.js +13 -6
- package/esm/version.js +1 -1
- package/package.json +3 -2
- package/typings/version.d.cts +1 -1
- package/typings/version.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.useHive = useHive;
|
|
|
6
6
|
const graphql_1 = require("graphql");
|
|
7
7
|
const graphql_yoga_1 = require("graphql-yoga");
|
|
8
8
|
const core_1 = require("@graphql-hive/core");
|
|
9
|
+
const logger_1 = require("@graphql-hive/logger");
|
|
9
10
|
const plugin_persisted_operations_1 = require("@graphql-yoga/plugin-persisted-operations");
|
|
10
11
|
const version_js_1 = require("./version.js");
|
|
11
12
|
var core_2 = require("@graphql-hive/core");
|
|
@@ -120,14 +121,20 @@ function useHive(clientOrOptions) {
|
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
onPluginInit({ addPlugin }) {
|
|
124
|
+
var _a;
|
|
123
125
|
hive = (0, core_1.isHiveClient)(clientOrOptions)
|
|
124
126
|
? clientOrOptions
|
|
125
|
-
: createHive(Object.assign(Object.assign({}, clientOrOptions), {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
: createHive(Object.assign(Object.assign({}, clientOrOptions), { logger: (_a = clientOrOptions.logger) !== null && _a !== void 0 ? _a : new logger_1.Logger({
|
|
128
|
+
writers: [
|
|
129
|
+
{
|
|
130
|
+
write(level, attrs, msg) {
|
|
131
|
+
level = level === 'trace' ? 'debug' : level;
|
|
132
|
+
yoga.logger[level](msg, attrs);
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
}), agent: clientOrOptions.agent
|
|
137
|
+
? Object.assign({
|
|
131
138
|
// Hive Plugin should respect the given FetchAPI, note that this is not `yoga.fetch`
|
|
132
139
|
fetch: (...args) => yoga.fetchAPI.fetch(...args) }, clientOrOptions.agent) : undefined }));
|
|
133
140
|
void hive.info();
|
package/cjs/version.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GraphQLError, Kind, parse } from 'graphql';
|
|
2
2
|
import { _createLRUCache } from 'graphql-yoga';
|
|
3
3
|
import { autoDisposeSymbol, createHive as createHiveClient, isAsyncIterable, isHiveClient, } from '@graphql-hive/core';
|
|
4
|
+
import { Logger } from '@graphql-hive/logger';
|
|
4
5
|
import { usePersistedOperations } from '@graphql-yoga/plugin-persisted-operations';
|
|
5
6
|
import { version } from './version.js';
|
|
6
7
|
export { atLeastOnceSampler, createSchemaFetcher, createServicesFetcher, createSupergraphSDLFetcher, } from '@graphql-hive/core';
|
|
@@ -111,14 +112,20 @@ export function useHive(clientOrOptions) {
|
|
|
111
112
|
}
|
|
112
113
|
},
|
|
113
114
|
onPluginInit({ addPlugin }) {
|
|
115
|
+
var _a;
|
|
114
116
|
hive = isHiveClient(clientOrOptions)
|
|
115
117
|
? clientOrOptions
|
|
116
|
-
: createHive(Object.assign(Object.assign({}, clientOrOptions), {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
: createHive(Object.assign(Object.assign({}, clientOrOptions), { logger: (_a = clientOrOptions.logger) !== null && _a !== void 0 ? _a : new Logger({
|
|
119
|
+
writers: [
|
|
120
|
+
{
|
|
121
|
+
write(level, attrs, msg) {
|
|
122
|
+
level = level === 'trace' ? 'debug' : level;
|
|
123
|
+
yoga.logger[level](msg, attrs);
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
}), agent: clientOrOptions.agent
|
|
128
|
+
? Object.assign({
|
|
122
129
|
// Hive Plugin should respect the given FetchAPI, note that this is not `yoga.fetch`
|
|
123
130
|
fetch: (...args) => yoga.fetchAPI.fetch(...args) }, clientOrOptions.agent) : undefined }));
|
|
124
131
|
void hive.info();
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.
|
|
1
|
+
export const version = '0.44.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/yoga",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2",
|
|
4
4
|
"description": "GraphQL Hive + GraphQL Yoga",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
"graphql-yoga": "^5.10.8"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"@graphql-hive/logger": "^1.0.9",
|
|
11
12
|
"@graphql-yoga/plugin-persisted-operations": "^3.9.0",
|
|
12
|
-
"@graphql-hive/core": "0.
|
|
13
|
+
"@graphql-hive/core": "0.16.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
package/typings/version.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.44.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/typings/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.44.0-alpha-20251125121050-94b0fd960a0afb15a2a04e903a711c75cb6020a2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|