MCPcopy Create free account
hub / github.com/Urigo/graphql-cli / getConfig

Function getConfig

templates/fullstack/server/src/db.ts:4–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import Knex from 'knex';
3
4export const getConfig = async () => {
5 const config = await loadConfig({
6 extensions: [() => ({ name: 'dbmigrations' })],
7 });
8 if (!config) {
9 throw new Error('Missing dbmigrations config');
10 }
11 const conf = await config.getDefault().extension('dbmigrations');
12
13 return conf;
14};
15
16/**
17 * Creates knex based database using migration configuration

Callers 2

createApolloServerFunction · 0.90
createDBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…