Skip to main content

init

Create a GraphQL project using a template or GraphQL Config file for your existing project.

Installation#

yarn global add @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.

Usage#

graphql init

Follow the prompts to set up your project.

Arguments#

None

Options#

optionaliasdescriptiondefault
--projectNameName of a project in GraphQL Configundefined
--templateNameName of one of the predefined templatesundefined
--templateUrlGitHub URL of the template. For example http://github.com/example/graphql-cli-example-templateundefined