Skip to content

Commit f22b935

Browse files
enisdenjogithub-actions[bot]theguild-bot
committed
Hive Logger (#1030)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: theguild-bot <[email protected]>
1 parent e563da7 commit f22b935

File tree

115 files changed

+4117
-2345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+4117
-2345
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-hive/gateway': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@graphql-hive/gateway-runtime': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Added dependency [`@envelop/instrumentation@^1.0.0` ↗︎](https://www.npmjs.com/package/@envelop/instrumentation/v/1.0.0) (to `dependencies`)
8+
- Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)
9+
- Removed dependency [`@graphql-hive/logger-json@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger-json/v/workspace:^) (from `dependencies`)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-mesh/fusion-runtime': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)
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+
- Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-mesh/transport-common': patch
3+
---
4+
5+
dependencies updates:
6+
7+
- Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)

.changeset/itchy-ways-cross.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@graphql-mesh/hmac-upstream-signature': major
3+
'@graphql-mesh/transport-http-callback': major
4+
'@graphql-mesh/plugin-opentelemetry': major
5+
'@graphql-mesh/plugin-prometheus': major
6+
'@graphql-mesh/transport-common': major
7+
'@graphql-mesh/plugin-jwt-auth': major
8+
'@graphql-mesh/fusion-runtime': major
9+
'@graphql-mesh/transport-ws': major
10+
'@graphql-hive/gateway': major
11+
'@graphql-hive/gateway-runtime': major
12+
'@graphql-hive/nestjs': major
13+
---
14+
15+
Introduce and use the new Hive Logger
16+
17+
- [Read more about it on the Hive Logger documentation here.](https://the-guild.dev/graphql/hive/docs/logger)
18+
19+
- If coming from Hive Gateway v1, [read the migration guide here.](https://the-guild.dev/graphql/hive/docs/migration-guides/gateway-v1-v2)

.changeset/tough-elephants-shop.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@graphql-hive/logger': major
3+
---
4+
5+
Introducing Hive Logger
6+
7+
[Read more about it on the Hive Logger documentation website.](https://the-guild.dev/graphql/hive/docs/logger)

babel.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ module.exports = {
1111
['@babel/plugin-proposal-decorators', { version: '2023-11' }],
1212
'@babel/plugin-transform-class-properties',
1313
'@babel/plugin-proposal-explicit-resource-management',
14+
'@babel/plugin-transform-private-methods',
1415
],
1516
};

e2e/config-syntax-error/config-syntax-error.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ it.skipIf(
3131
}),
3232
).rejects.toThrowError(
3333
gatewayRunner === 'bun' || gatewayRunner === 'bun-docker'
34-
? /error: Expected "{" but found "hello"(.|\n)*\/custom-resolvers.ts:8:11/
35-
: /SyntaxError \[Error\]: Error transforming .*(\/|\\)custom-resolvers.ts: Unexpected token, expected "{" \(8:11\)/,
34+
? /Expected \\"{\\" but found \\"hello\\"(.|\n)*\/custom-resolvers.ts/
35+
: /Error transforming .*(\/|\\)custom-resolvers.ts: Unexpected token, expected \\"{\\" \(8:11\)/,
3636
);
3737
},
3838
);

e2e/graphos-polling/services/gateway-fastify.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createGatewayRuntime } from '@graphql-hive/gateway-runtime';
2-
import { createLoggerFromPino } from '@graphql-hive/logger-pino';
1+
import { createGatewayRuntime, Logger } from '@graphql-hive/gateway-runtime';
2+
import { PinoLogWriter } from '@graphql-hive/logger/writers/pino';
33
import {
44
createOtlpHttpExporter,
55
useOpenTelemetry,
@@ -43,8 +43,7 @@ export interface FastifyContext {
4343
}
4444

4545
const gw = createGatewayRuntime<FastifyContext>({
46-
// Integrate Fastify's logger / Pino with the gateway logger
47-
logging: createLoggerFromPino(app.log),
46+
logging: new Logger({ writers: [new PinoLogWriter(app.log)] }),
4847
// Align with Fastify
4948
requestId: {
5049
// Use the same header name as Fastify

0 commit comments

Comments
 (0)