init
Create a GraphQL project using a template or GraphQL Config file for your existing project.
#
Installation- yarn
- npm
yarn global add @graphql-cli/init
npm i -g @graphql-cli/init
Note: Because you probably won't need to run this command again after bootstrapping your project, you can also run it using npx
instead of installing the package: npx graphql init
.
#
Usagegraphql init
Follow the prompts to set up your project.
#
ArgumentsNone
#
Optionsoption | alias | description | default |
---|---|---|---|
--projectName | Name of a project in GraphQL Config | undefined | |
--templateName | Name of one of the predefined templates | undefined | |
--templateUrl | GitHub URL of the template. For example http://github.com/example/graphql-cli-example-template | undefined |