Only CLI option?
jerrygreen opened this issue · 1 comments
jerrygreen commented
I'd like to import the lib from my js/ts file, with my own logic, and start the server from there like:
import { createServer } from 'tuql'
bradleyboy commented
@jerrygreen Not currently possible, but you can get pretty close by using the exported buildSchemaFromDatabase
function provided by tuql
. That's what the CLI uses, and it's pretty simple to do something similar in your own app:
https://github.com/bradleyboy/tuql/blob/master/src/bin/index.js#L86-L116