Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jan 8, 2025
1 parent 0d9f638 commit 8d8c090
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 30 deletions.
2 changes: 1 addition & 1 deletion e2e/polling/gateway.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export const gatewayConfig = defineConfig({
return fs.promises.readFile(SUPERGRAPH_PATH, 'utf8');
},
pollingInterval: 5_000,
});
});
2 changes: 1 addition & 1 deletion e2e/polling/mesh.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export const composeConfig = defineConfig({
}),
},
],
});
});
51 changes: 24 additions & 27 deletions e2e/polling/polling.e2e.ts
Original file line number Diff line number Diff line change
@@ -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);
})
`,
});
expect(res).toMatchObject({
data: {
hello: 'Hello world!',
},
});
}, 30_000);
});
2 changes: 1 addition & 1 deletion e2e/polling/services/Graph.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 8d8c090

Please sign in to comment.