From 9338e8c60cb7f0e5febc930d0868aa809a27c6f8 Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Thu, 12 Dec 2024 05:16:45 +0300 Subject: [PATCH] Avoid uploading Mesh configuration --- e2e/apq-subgraphs/gateway.config.ts | 20 ++++++++++++++++++++ e2e/apq-subgraphs/mesh.config.ts | 24 ++---------------------- internal/e2e/src/tenv.ts | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 e2e/apq-subgraphs/gateway.config.ts diff --git a/e2e/apq-subgraphs/gateway.config.ts b/e2e/apq-subgraphs/gateway.config.ts new file mode 100644 index 00000000..4f1488f3 --- /dev/null +++ b/e2e/apq-subgraphs/gateway.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from '@graphql-hive/gateway'; + +let fetchCnt = 0; +export const gatewayConfig = defineConfig({ + transportEntries: { + greetings: { + options: { + apq: true, + }, + }, + }, + plugins: () => [ + { + onFetch({ options }) { + fetchCnt++; + process.stdout.write(`fetch ${fetchCnt} ${options.body}\n`); + }, + }, + ], +}); diff --git a/e2e/apq-subgraphs/mesh.config.ts b/e2e/apq-subgraphs/mesh.config.ts index 1fc269b8..7c7660f0 100644 --- a/e2e/apq-subgraphs/mesh.config.ts +++ b/e2e/apq-subgraphs/mesh.config.ts @@ -1,13 +1,12 @@ -import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { - defineConfig as defineComposeConfig, + defineConfig, loadGraphQLHTTPSubgraph, } from '@graphql-mesh/compose-cli'; import { Opts } from '@internal/testing'; const opts = Opts(process.argv); -export const composeConfig = defineComposeConfig({ +export const composeConfig = defineConfig({ subgraphs: [ { sourceHandler: loadGraphQLHTTPSubgraph('greetings', { @@ -16,22 +15,3 @@ export const composeConfig = defineComposeConfig({ }, ], }); - -let fetchCnt = 0; -export const gatewayConfig = defineGatewayConfig({ - transportEntries: { - greetings: { - options: { - apq: true, - }, - }, - }, - plugins: () => [ - { - onFetch({ options }) { - fetchCnt++; - process.stdout.write(`fetch ${fetchCnt} ${options.body}\n`); - }, - }, - ], -}); diff --git a/internal/e2e/src/tenv.ts b/internal/e2e/src/tenv.ts index 455534f7..425f9b08 100644 --- a/internal/e2e/src/tenv.ts +++ b/internal/e2e/src/tenv.ts @@ -401,7 +401,7 @@ export function createTenv(cwd: string): Tenv { subgraph = await handleDockerHostName(subgraph, volumes); } - for (const configfile of await glob('@(mesh|gateway).config.*', { + for (const configfile of await glob('gateway.config.*', { cwd, })) { volumes.push({