@lite-v3/gqlcodegen-cli
CLI tools for @lite-v3/graphql-codegen
Usage
This package contains the main functionality and acts as the CLI front-end of the @lite-v3/graphql-codegen package. In addition to it, this package also provides a configuration parser to customize the functionality and to provide the necessary variables (such as the desired schema URL) for the main program to work. Since this package is also registered as an NPM executable, you can run it by simply entering:
$ npx @lite-v3/gqlcodegen-cli
This will in turn give our the available parameters. To execute the main functionality as a GraphQL type generator, add gen
to the command:
$ npx @lite-v3/gqlcodegen-cli gen
Do note that by design, you would need to provide a configuration file named gql-codegen.config.yaml
in the same place as you ran the command. If you haven't
generate one, simply run
$ npx @lite-v3/gqlcodegen-cli config
and it will go through a prompt-style questionnaire to generate your configuration file. Finally, you can add -h
to each of the command to see the full available
parameters that are supported by the CLI.
Code By WPE Team @Tokopedia