Skip to content

Commit c85f182

Browse files
renovate[bot]ardatan
authored andcommitted
fix(deps): update gateway dependencies (#8244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 134f062 commit c85f182

File tree

13 files changed

+144
-308
lines changed

13 files changed

+144
-308
lines changed

.changeset/shaggy-cooks-pull.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-mesh/transform-hive': patch
3+
'@graphql-mesh/plugin-hive': patch
4+
---
5+
6+
Bump Hive Console dependencies

examples/hive-example/sources/authors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"typescript": "^5.4.2"
1414
},
1515
"devDependencies": {
16-
"@graphql-hive/cli": "0.44.5",
16+
"@graphql-hive/cli": "0.45.0",
1717
"@graphql-mesh/cli": "0.98.17",
1818
"@graphql-mesh/openapi": "0.108.13",
1919
"graphql": "16.10.0"

examples/hive-example/sources/books/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"typescript": "^5.4.2"
1414
},
1515
"devDependencies": {
16-
"@graphql-hive/cli": "0.44.5",
16+
"@graphql-hive/cli": "0.45.0",
1717
"@graphql-mesh/cli": "0.98.17",
1818
"@graphql-mesh/openapi": "0.108.13",
1919
"graphql": "16.10.0"

examples/v1-next/hive-example/my-graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "node --import tsx index.ts"
77
},
88
"dependencies": {
9-
"@graphql-hive/cli": "0.44.5",
9+
"@graphql-hive/cli": "0.45.0",
1010
"graphql": "16.10.0",
1111
"graphql-yoga": "5.10.9"
1212
}

examples/v1-next/hive-example/my-rest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "node --import tsx index.ts"
88
},
99
"dependencies": {
10-
"@graphql-hive/cli": "0.44.5",
10+
"@graphql-hive/cli": "0.45.0",
1111
"@graphql-mesh/compose-cli": "workspace:*",
1212
"@omnigraph/openapi": "workspace:*",
1313
"fets": "0.8.4",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
},
108108
"resolutions": {
109109
"@changesets/assemble-release-plan": "patch:@changesets/assemble-release-plan@npm%3A5.2.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-5.2.3-296454a28f.patch",
110-
"@whatwg-node/fetch": "0.10.1",
111-
"@whatwg-node/node-fetch": "0.7.5",
110+
"@whatwg-node/fetch": "0.10.3",
111+
"@whatwg-node/node-fetch": "0.7.7",
112112
"@whatwg-node/server": "0.9.65",
113113
"es5-ext": "0.10.64",
114114
"esbuild": "^0.24.0",

packages/legacy/transforms/hive/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
"graphql": "*"
3636
},
3737
"dependencies": {
38-
"@graphql-hive/core": "^0.8.1",
39-
"@graphql-hive/yoga": "^0.39.0",
38+
"@graphql-hive/core": "^0.8.3",
4039
"@graphql-mesh/cross-helpers": "^0.4.9",
4140
"@graphql-mesh/string-interpolation": "^0.5.7",
4241
"@graphql-mesh/types": "^0.103.11",

packages/legacy/transforms/hive/src/index.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { isSchema, Kind, visit, type ExecutionResult, type GraphQLSchema } from 'graphql';
2-
import type { HiveClient, HivePluginOptions } from '@graphql-hive/core';
3-
import { createHive } from '@graphql-hive/yoga';
1+
import { Kind, visit, type ExecutionResult, type GraphQLSchema } from 'graphql';
2+
import { createHive, type HiveClient, type HivePluginOptions } from '@graphql-hive/core';
43
import { process } from '@graphql-mesh/cross-helpers';
54
import { stringInterpolator } from '@graphql-mesh/string-interpolation';
65
import type { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types';
@@ -16,7 +15,7 @@ export default class HiveTransform implements MeshTransform {
1615
private hiveClient: HiveClient;
1716
private logger: MeshTransformOptions<YamlConfig.HivePlugin>['logger'];
1817
private schema: GraphQLSchema;
19-
constructor({ config, pubsub, logger }: MeshTransformOptions<YamlConfig.HivePlugin>) {
18+
constructor({ config, logger }: MeshTransformOptions<YamlConfig.HivePlugin>) {
2019
this.logger = logger;
2120
const enabled =
2221
// eslint-disable-next-line no-new-func
@@ -77,26 +76,8 @@ export default class HiveTransform implements MeshTransform {
7776
agent,
7877
usage,
7978
reporting,
80-
autoDispose: false,
8179
selfHosting: config.selfHosting,
8280
});
83-
const id = pubsub.subscribe('destroy', () => {
84-
try {
85-
mapMaybePromise(
86-
this.hiveClient.dispose(),
87-
() => {
88-
pubsub.unsubscribe(id);
89-
},
90-
e => {
91-
logger.error(`Hive client failed to dispose`, e);
92-
pubsub.unsubscribe(id);
93-
},
94-
);
95-
} catch (e) {
96-
logger.error(`Failed to dispose hive client`, e);
97-
pubsub.unsubscribe(id);
98-
}
99-
});
10081
}
10182

10283
transformSchema(schema: GraphQLSchema) {

packages/loaders/openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"tslib": "^2.4.0"
4949
},
5050
"devDependencies": {
51-
"@whatwg-node/fetch": "0.10.1",
51+
"@whatwg-node/fetch": "0.10.3",
5252
"fets": "0.8.4",
5353
"graphql-yoga": "5.10.9",
5454
"json-bigint-patch": "0.0.8"

packages/plugins/deduplicate-request/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"tslib": "^2.4.0"
4242
},
4343
"devDependencies": {
44-
"@whatwg-node/fetch": "0.10.1"
44+
"@whatwg-node/fetch": "0.10.3"
4545
},
4646
"publishConfig": {
4747
"access": "public",

packages/plugins/hive/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@
3535
"graphql": "*"
3636
},
3737
"dependencies": {
38-
"@graphql-hive/core": "^0.8.1",
39-
"@graphql-hive/yoga": "^0.39.0",
38+
"@graphql-hive/core": "^0.8.3",
39+
"@graphql-hive/yoga": "^0.39.2",
4040
"@graphql-mesh/cross-helpers": "^0.4.9",
4141
"@graphql-mesh/string-interpolation": "0.5.7",
4242
"@graphql-mesh/types": "^0.103.11",
43-
"@graphql-mesh/utils": "^0.103.11",
4443
"tslib": "^2.4.0"
4544
},
4645
"publishConfig": {

packages/plugins/hive/src/index.ts

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import type { HivePluginOptions } from '@graphql-hive/core';
2-
import { createHive, useHive } from '@graphql-hive/yoga';
2+
import { useHive } from '@graphql-hive/yoga';
33
import { process } from '@graphql-mesh/cross-helpers';
44
import { stringInterpolator } from '@graphql-mesh/string-interpolation';
5-
import type { Logger, MeshPlugin, MeshPubSub, YamlConfig } from '@graphql-mesh/types';
6-
import { makeAsyncDisposable } from '@graphql-mesh/utils';
5+
import type { Logger, MeshPlugin, YamlConfig } from '@graphql-mesh/types';
76

87
export default function useMeshHive<TContext>(
98
pluginOptions: YamlConfig.HivePlugin & {
109
logger?: Logger;
11-
pubsub?: MeshPubSub;
1210
},
1311
): MeshPlugin<TContext> {
1412
const enabled =
@@ -106,7 +104,7 @@ export default function useMeshHive<TContext>(
106104
}),
107105
};
108106
}
109-
const hiveClient = createHive({
107+
const yogaPluginOpts: HivePluginOptions = {
110108
enabled:
111109
// eslint-disable-next-line no-unneeded-ternary -- for brevity
112110
persistedDocuments && !token
@@ -118,24 +116,8 @@ export default function useMeshHive<TContext>(
118116
usage,
119117
reporting,
120118
selfHosting,
121-
// Mesh already disposes the client below on Mesh's `destroy` event
122-
autoDispose: false,
123119
experimental__persistedDocuments: persistedDocuments,
124-
});
125-
// TODO: Remove later after v0
126-
// Pubsub.destroy will no longer
127-
function onTerminate() {
128-
return hiveClient
129-
.dispose()
130-
.catch(e => pluginOptions.logger?.error(`Hive client failed to dispose`, e));
131-
}
132-
const id: number = pluginOptions.pubsub?.subscribe('destroy', () =>
133-
onTerminate().finally(() => pluginOptions.pubsub.unsubscribe(id)),
134-
);
135-
136-
return makeAsyncDisposable<MeshPlugin<TContext>>(
137-
// @ts-expect-error - Typings are wrong
138-
useHive(hiveClient),
139-
onTerminate,
140-
);
120+
};
121+
// @ts-expect-error - Typings are incorrect
122+
return useHive(yogaPluginOpts);
141123
}

0 commit comments

Comments
 (0)