Skip to content

Commit d1df7ab

Browse files
Fix prometheus plugin always expecting a graphql document in parse hook (#1716)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 6bd2f69 commit d1df7ab

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-mesh/plugin-prometheus': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Updated dependency [`@graphql-yoga/plugin-prometheus@^6.11.3` ↗︎](https://www.npmjs.com/package/@graphql-yoga/plugin-prometheus/v/6.11.3) (from `^6.11.2`, in `dependencies`)

.changeset/wet-jeans-thank.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@graphql-mesh/plugin-prometheus': patch
3+
---
4+
5+
Plugin stops and handles parsing errors
6+
7+
Previously it would throw an unhandled exception becauase Prometheus was expecting a GraphQL
8+
document in onParse hook always, but it can also be an error.
9+
10+
Actual fix is done in the GraphQL Yoga repository: https://github.com/graphql-hive/graphql-yoga/pull/4296.

packages/plugins/prometheus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@graphql-mesh/types": "^0.104.16",
5050
"@graphql-mesh/utils": "^0.104.16",
5151
"@graphql-tools/utils": "^10.10.3",
52-
"@graphql-yoga/plugin-prometheus": "^6.11.2",
52+
"@graphql-yoga/plugin-prometheus": "^6.11.3",
5353
"prom-client": "^15.0.0",
5454
"tslib": "^2.8.1"
5555
},

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4767,7 +4767,7 @@ __metadata:
47674767
"@graphql-mesh/types": "npm:^0.104.16"
47684768
"@graphql-mesh/utils": "npm:^0.104.16"
47694769
"@graphql-tools/utils": "npm:^10.10.3"
4770-
"@graphql-yoga/plugin-prometheus": "npm:^6.11.2"
4770+
"@graphql-yoga/plugin-prometheus": "npm:^6.11.3"
47714771
graphql: "npm:^16.12.0"
47724772
graphql-yoga: "npm:^5.16.2"
47734773
pkgroll: "npm:2.20.1"
@@ -5659,16 +5659,16 @@ __metadata:
56595659
languageName: node
56605660
linkType: hard
56615661

5662-
"@graphql-yoga/plugin-prometheus@npm:^6.11.2":
5663-
version: 6.11.2
5664-
resolution: "@graphql-yoga/plugin-prometheus@npm:6.11.2"
5662+
"@graphql-yoga/plugin-prometheus@npm:^6.11.3":
5663+
version: 6.11.3
5664+
resolution: "@graphql-yoga/plugin-prometheus@npm:6.11.3"
56655665
dependencies:
56665666
"@envelop/prometheus": "npm:^14.0.0"
56675667
peerDependencies:
56685668
graphql: ^15.2.0 || ^16.0.0
56695669
graphql-yoga: ^5.16.2
56705670
prom-client: ^15.0.0
5671-
checksum: 10c0/c099cf804834207c27dc4a06d3961b9b990137e5843bfbe2767935b9af6ddfbcd8405ae67e6b0000a9db31cbb1cfc81005e0b650bc72acb2333a545111f2a56e
5671+
checksum: 10c0/c7c4d58ce8777e6c31f7eec9b48abafc6ab664d4956b39d81b85758e2e4064284ba6a36df91b4073d17d5987bb823c56b1c1ab47034feb6b8d7aeffa0c738a25
56725672
languageName: node
56735673
linkType: hard
56745674

0 commit comments

Comments
 (0)