Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming Release Changes #386

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .changeset/@graphql-hive_gateway-390-dependencies.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/@graphql-hive_gateway-392-dependencies.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/nervous-cups-scream.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/batch-delegate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @graphql-tools/batch-delegate

## 9.0.26

### Patch Changes

- [#382](https://github.com/graphql-hive/gateway/pull/382) [`21e1f05`](https://github.com/graphql-hive/gateway/commit/21e1f05373a78c93b52b5321f1f4e8d7aba17151) Thanks [@ardatan](https://github.com/ardatan)! - Memoize the batched delegation loader by respecting the arguments correctly

[See more details in the PR](https://github.com/ardatan/graphql-tools/pull/5189)

## 9.0.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/batch-delegate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-tools/batch-delegate",
"version": "9.0.25",
"version": "9.0.26",
"type": "module",
"description": "A set of utils for faster development of GraphQL tools",
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions packages/federation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @graphql-tools/federation

## 3.0.6

### Patch Changes

- Updated dependencies []:
- @graphql-tools/stitch@9.4.12

## 3.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/federation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-tools/federation",
"version": "3.0.5",
"version": "3.0.6",
"type": "module",
"description": "Useful tools to create and manipulate GraphQL schemas.",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/fusion-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @graphql-mesh/fusion-runtime

## 0.10.26

### Patch Changes

- Updated dependencies []:
- @graphql-tools/stitch@9.4.12
- @graphql-tools/federation@3.0.6

## 0.10.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/fusion-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-mesh/fusion-runtime",
"version": "0.10.25",
"version": "0.10.26",
"type": "module",
"description": "Runtime for GraphQL Mesh Fusion Supergraph",
"repository": {
Expand Down
19 changes: 19 additions & 0 deletions packages/gateway/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @graphql-hive/gateway

## 1.7.5

### Patch Changes

- [#390](https://github.com/graphql-hive/gateway/pull/390) [`708c32f`](https://github.com/graphql-hive/gateway/commit/708c32f30bd0950e0e397a50c64af3ed9bd40d5c) Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:

- Updated dependency [`commander@^13.0.0` ↗︎](https://www.npmjs.com/package/commander/v/13.0.0) (from `^12.0.0`, in `dependencies`)

- [#392](https://github.com/graphql-hive/gateway/pull/392) [`121751d`](https://github.com/graphql-hive/gateway/commit/121751db50bc13454122f4decbba715ba8d400c2) Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:

- Updated dependency [`@commander-js/extra-typings@^13.0.0` ↗︎](https://www.npmjs.com/package/@commander-js/extra-typings/v/13.0.0) (from `^12.1.0`, in `dependencies`)
- Updated dependency [`commander@^13.0.0` ↗︎](https://www.npmjs.com/package/commander/v/13.0.0) (from `^12.0.0`, in `dependencies`)

- Updated dependencies []:
- @graphql-mesh/hmac-upstream-signature@1.2.19
- @graphql-hive/gateway-runtime@1.4.5
- @graphql-mesh/plugin-opentelemetry@1.3.33
- @graphql-mesh/plugin-prometheus@1.3.21

## 1.7.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-hive/gateway",
"version": "1.7.4",
"version": "1.7.5",
"type": "module",
"repository": {
"type": "git",
Expand Down
98 changes: 52 additions & 46 deletions packages/gateway/src/commands/supergraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,56 +280,62 @@ export async function runSupergraph(
}
}

if (absSchemaPath && cluster.isPrimary) {
let watcher: typeof import('@parcel/watcher') | undefined;
try {
watcher = await import('@parcel/watcher');
} catch (e) {
if (Object(e).code !== 'MODULE_NOT_FOUND') {
log.debug('Problem while importing @parcel/watcher', e);
}
log.warn(
`If you want to enable hot reloading when ${absSchemaPath} changes, make sure "@parcel/watcher" is available`,
);
}
if (watcher) {
if (absSchemaPath) {
// Polling should not be enabled when watching the file
delete config.pollingInterval;
if (cluster.isPrimary) {
let watcher: typeof import('@parcel/watcher') | undefined;
try {
log.info(`Watching ${absSchemaPath} for changes`);
const absSupergraphDirname = dirname(absSchemaPath);
const subscription = await watcher.subscribe(
absSupergraphDirname,
(err, events) => {
if (err) {
log.error(err);
return;
}
if (
events.some(
(event) =>
event.path === absSchemaPath && event.type === 'update',
)
) {
log.info(`${absSchemaPath} changed. Invalidating supergraph...`);
if (config.fork && config.fork > 1) {
for (const workerId in cluster.workers) {
cluster.workers[workerId]!.send('invalidateUnifiedGraph');
watcher = await import('@parcel/watcher');
} catch (e) {
if (Object(e).code !== 'MODULE_NOT_FOUND') {
log.debug('Problem while importing @parcel/watcher', e);
}
log.warn(
`If you want to enable hot reloading when ${absSchemaPath} changes, make sure "@parcel/watcher" is available`,
);
}
if (watcher) {
try {
log.info(`Watching ${absSchemaPath} for changes`);
const absSupergraphDirname = dirname(absSchemaPath);
const subscription = await watcher.subscribe(
absSupergraphDirname,
(err, events) => {
if (err) {
log.error(err);
return;
}
if (
events.some(
(event) =>
event.path === absSchemaPath && event.type === 'update',
)
) {
log.info(
`${absSchemaPath} changed. Invalidating supergraph...`,
);
if (config.fork && config.fork > 1) {
for (const workerId in cluster.workers) {
cluster.workers[workerId]!.send('invalidateUnifiedGraph');
}
} else {
runtime.invalidateUnifiedGraph();
}
} else {
runtime.invalidateUnifiedGraph();
}
}
},
);
registerTerminateHandler((signal) => {
log.info(`Closing watcher for ${absSchemaPath} on ${signal}`);
return subscription.unsubscribe().catch((err) => {
// https://github.com/parcel-bundler/watcher/issues/129
log.error(`Failed to close watcher for ${absSchemaPath}!`, err);
},
);
registerTerminateHandler((signal) => {
log.info(`Closing watcher for ${absSchemaPath} on ${signal}`);
return subscription.unsubscribe().catch((err) => {
// https://github.com/parcel-bundler/watcher/issues/129
log.error(`Failed to close watcher for ${absSchemaPath}!`, err);
});
});
});
} catch (err) {
log.error(`Failed to watch ${absSchemaPath}!`);
throw err;
} catch (err) {
log.error(`Failed to watch ${absSchemaPath}!`);
throw err;
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions packages/plugins/opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @graphql-mesh/plugin-opentelemetry

## 1.3.33

### Patch Changes

- Updated dependencies []:
- @graphql-hive/gateway-runtime@1.4.5

## 1.3.32

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/opentelemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-mesh/plugin-opentelemetry",
"version": "1.3.32",
"version": "1.3.33",
"type": "module",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/plugins/prometheus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @graphql-mesh/plugin-prometheus

## 1.3.21

### Patch Changes

- Updated dependencies []:
- @graphql-hive/gateway-runtime@1.4.5

## 1.3.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/prometheus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-mesh/plugin-prometheus",
"version": "1.3.20",
"version": "1.3.21",
"type": "module",
"repository": {
"type": "git",
Expand Down
11 changes: 11 additions & 0 deletions packages/runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @graphql-hive/gateway-runtime

## 1.4.5

### Patch Changes

- Updated dependencies [[`21e1f05`](https://github.com/graphql-hive/gateway/commit/21e1f05373a78c93b52b5321f1f4e8d7aba17151)]:
- @graphql-tools/batch-delegate@9.0.26
- @graphql-mesh/hmac-upstream-signature@1.2.19
- @graphql-tools/stitch@9.4.12
- @graphql-tools/federation@3.0.6
- @graphql-mesh/fusion-runtime@0.10.26

## 1.4.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-hive/gateway-runtime",
"version": "1.4.4",
"version": "1.4.5",
"type": "module",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/stitch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @graphql-tools/stitch

## 9.4.12

### Patch Changes

- Updated dependencies [[`21e1f05`](https://github.com/graphql-hive/gateway/commit/21e1f05373a78c93b52b5321f1f4e8d7aba17151)]:
- @graphql-tools/batch-delegate@9.0.26

## 9.4.11

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/stitch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphql-tools/stitch",
"version": "9.4.11",
"version": "9.4.12",
"type": "module",
"description": "A set of utils for faster development of GraphQL tools",
"repository": {
Expand Down
Loading