MCPcopy Create free account
hub / github.com/subquery/subql / createApolloServer

Function createApolloServer

packages/query/src/graphql/graphql.test.ts:44–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 async function createApolloServer() {
45 const builder = await getPostGraphileBuilder(pool, [dbSchema], {
46 replaceAllPlugins: plugins,
47 subscriptions: true,
48 dynamicJson: true,
49 });
50
51 const schema = builder.buildSchema();
52
53 const server = new ApolloServer({
54 schema,
55 context: {
56 pgClient: pool,
57 },
58 });
59
60 return server;
61 }
62
63 beforeEach(async () => {
64 await pool.query(`CREATE SCHEMA IF NOT EXISTS ${dbSchema}`);

Callers 1

graphql.test.tsFile · 0.70

Calls 1

buildSchemaMethod · 0.80

Tested by

no test coverage detected