mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Bump Hive Gateway and no cross-origin credentials (#7305)
This commit is contained in:
parent
5fec03c297
commit
eb700a1b50
6 changed files with 4559 additions and 151 deletions
4
configs/cargo/Cargo.lock
generated
4
configs/cargo/Cargo.lock
generated
|
|
@ -2604,7 +2604,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "hive-apollo-router-plugin"
|
||||
version = "2.3.2"
|
||||
version = "2.3.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"apollo-router",
|
||||
|
|
@ -2638,7 +2638,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "hive-console-sdk"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
// @ts-expect-error not a dependency
|
||||
import { defineConfig } from '@graphql-hive/gateway';
|
||||
// @ts-expect-error not a dependency
|
||||
import { hiveTracingSetup } from '@graphql-hive/plugin-opentelemetry/setup';
|
||||
import type { Context } from '@opentelemetry/api';
|
||||
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
||||
|
|
@ -69,6 +67,8 @@ if (
|
|||
// Noop is only there to not raise an exception in case we do not hive console tracing.
|
||||
target: process.env['HIVE_HIVE_TARGET'] ?? 'noop',
|
||||
contextManager: new AsyncLocalStorageContextManager(),
|
||||
// @ts-expect-error console uses otel v1 and hive gateway uses v2
|
||||
// TODO: upgrade console to otel v2
|
||||
processor: new MultiSpanProcessor([
|
||||
...(process.env['HIVE_HIVE_TRACE_ACCESS_TOKEN'] &&
|
||||
process.env['HIVE_HIVE_TRACE_ENDPOINT'] &&
|
||||
|
|
@ -111,8 +111,8 @@ export const gatewayConfig = defineConfig({
|
|||
},
|
||||
supergraph: {
|
||||
type: 'hive',
|
||||
endpoint: process.env['SUPERGRAPH_ENDPOINT'],
|
||||
key: process.env['HIVE_CDN_ACCESS_TOKEN'],
|
||||
endpoint: process.env['SUPERGRAPH_ENDPOINT'] || '',
|
||||
key: process.env['HIVE_CDN_ACCESS_TOKEN'] || '',
|
||||
},
|
||||
graphiql: {
|
||||
title: 'Hive Console - GraphQL API',
|
||||
|
|
@ -127,12 +127,13 @@ export const gatewayConfig = defineConfig({
|
|||
},
|
||||
},
|
||||
disableWebsockets: true,
|
||||
prometheus: true,
|
||||
prometheus: {
|
||||
metrics: true,
|
||||
},
|
||||
openTelemetry:
|
||||
process.env['OPENTELEMETRY_COLLECTOR_ENDPOINT'] || process.env['HIVE_HIVE_TRACE_ACCESS_TOKEN']
|
||||
? {
|
||||
traces: true,
|
||||
serviceName: 'public-graphql-api-gateway',
|
||||
}
|
||||
: undefined,
|
||||
demandControl: {
|
||||
|
|
@ -141,4 +142,8 @@ export const gatewayConfig = defineConfig({
|
|||
},
|
||||
maxTokens: 1_000,
|
||||
maxDepth: 20,
|
||||
cors: {
|
||||
origin: '*', // allow all origins
|
||||
credentials: false, // do not allow credentials in cross-origin requests
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
"prettier": "3.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-hive/gateway": "^2.1.19",
|
||||
"@types/js-yaml": "4.0.9",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/node": "22.10.5",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { type OTELCollector } from './otel-collector';
|
|||
* Hive Gateway Docker Image Version
|
||||
* Bump this to update the used gateway version.
|
||||
*/
|
||||
const dockerImage = 'ghcr.io/graphql-hive/gateway:2.1.10';
|
||||
const dockerImage = 'ghcr.io/graphql-hive/gateway:2.1.19';
|
||||
|
||||
const gatewayConfigDirectory = path.resolve(
|
||||
__dirname,
|
||||
|
|
|
|||
4679
pnpm-lock.yaml
4679
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -74,6 +74,11 @@ async function rewritePackageJson(
|
|||
});
|
||||
}
|
||||
|
||||
const globalExternals: string[] = [
|
||||
// TODO: dependency of hive gateway. why does it get built by all packages, mystery
|
||||
'ansi-color',
|
||||
];
|
||||
|
||||
async function compile(
|
||||
cwd: string,
|
||||
entryPoint: string | string[],
|
||||
|
|
@ -96,7 +101,7 @@ async function compile(
|
|||
shims: true,
|
||||
skipNodeModulesBundle: false,
|
||||
// noExternal: dependencies,
|
||||
external: buildOptions.external,
|
||||
external: [...globalExternals, ...(buildOptions.external || [])],
|
||||
banner: {
|
||||
js: requireShim,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue