RFC: Exposing the generate-schema
and generate-output
actions from cli-utils
as Node.js API's
#134
Labels
future 🔮
An enhancement or feature proposal that will be addressed after the next release
Summary
We maintain a CLI to help users bootstrap a new project on our platform (e.g.,
npm create ...
), and as part of that process we would like to:gql.tada
to useWhile we could achieve this by using
child_process.exec
to call thegql.tada
CLI from within our CLI, we have concerns around:exec
spawns a new shell which adds overhead, but a direct API call can be executed within the same process space as our CLIstdout
andstderr
fromexec
to determine success/failure can become complicatedProposed Solution
cwd
an optional parameter on the method)generate-schema
andgenerate-output
logic into two individual methods that live outside of the CLI action handler callbacks.@gql.tada/cli-utils
package (we think importing these methods from@gql.tada/cli-utils
makes the most sense so we don't have to install the entiregql.tada
package in our CLI)Requirements
N/A
Relevant Links
The text was updated successfully, but these errors were encountered: