From 8d8c0905cbe61d8f88cc061e53d4adf12e3f251c Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Wed, 8 Jan 2025 15:08:28 +0300 Subject: [PATCH] format --- e2e/polling/gateway.config.ts | 2 +- e2e/polling/mesh.config.ts | 2 +- e2e/polling/polling.e2e.ts | 51 +++++++++++++++++------------------ e2e/polling/services/Graph.ts | 2 +- 4 files changed, 27 insertions(+), 30 deletions(-) diff --git a/e2e/polling/gateway.config.ts b/e2e/polling/gateway.config.ts index a9812980b..86919024d 100644 --- a/e2e/polling/gateway.config.ts +++ b/e2e/polling/gateway.config.ts @@ -9,4 +9,4 @@ export const gatewayConfig = defineConfig({ return fs.promises.readFile(SUPERGRAPH_PATH, 'utf8'); }, pollingInterval: 5_000, -}); \ No newline at end of file +}); diff --git a/e2e/polling/mesh.config.ts b/e2e/polling/mesh.config.ts index 637a3944a..b1654a1c5 100644 --- a/e2e/polling/mesh.config.ts +++ b/e2e/polling/mesh.config.ts @@ -19,4 +19,4 @@ export const composeConfig = defineConfig({ }), }, ], -}); \ No newline at end of file +}); diff --git a/e2e/polling/polling.e2e.ts b/e2e/polling/polling.e2e.ts index 5070afba1..a458bb596 100644 --- a/e2e/polling/polling.e2e.ts +++ b/e2e/polling/polling.e2e.ts @@ -1,29 +1,26 @@ -import { createTenv } from "@internal/e2e"; -import { describe, expect, it } from "vitest"; +import { createTenv } from '@internal/e2e'; +import { describe, expect, it } from 'vitest'; - -describe("Polling", async () => { - const { service, gateway } = createTenv(__dirname); - const gw = await gateway({ - supergraph: { - with: 'mesh', - services: [ - await service('Graph') - ] +describe('Polling', async () => { + const { service, gateway } = createTenv(__dirname); + const gw = await gateway({ + supergraph: { + with: 'mesh', + services: [await service('Graph')], + }, + }); + it('should not break the long running query while polling and schema remaining the same', async () => { + const res = await gw.execute({ + query: /* GraphQL */ ` + query { + hello } - }) - it('should not break the long running query while polling and schema remaining the same', async () => { - const res = await gw.execute({ - query: /* GraphQL */ ` - query { - hello - } - ` - }); - expect(res).toMatchObject({ - data: { - hello: 'Hello world!' - } - }); - }, 30_000); -}) \ No newline at end of file + `, + }); + expect(res).toMatchObject({ + data: { + hello: 'Hello world!', + }, + }); + }, 30_000); +}); diff --git a/e2e/polling/services/Graph.ts b/e2e/polling/services/Graph.ts index bac089f10..bfcf73782 100644 --- a/e2e/polling/services/Graph.ts +++ b/e2e/polling/services/Graph.ts @@ -1,9 +1,9 @@ import fs from 'fs'; import path from 'path'; +import { Opts } from '@internal/testing'; import express from 'express'; import { graphqlHTTP } from 'express-graphql'; import { buildSchema } from 'graphql'; -import { Opts } from '@internal/testing'; const app = express(); const opts = Opts(process.argv);