Skip to content

npx command for creating templates bootstrap like Next.js create-yoga #1354

@Urigo

Description

@Urigo

Similar to create-next-app (maybe we can even use/fork/contribute to their code) we want to create a CLI package which can be used to bootstrap a Yoga app. It should allow bootstrapping different ways yoga can be used.

Examples

  • npx create-yoga my-next-example --tenplate=next --ts this will create a NextJS app in which we have Yoga as /api/graphql
  • npx create-yoga my-node-app this is the default where it bootstraps a simple Node-js app with raw HTTP to use GraphQL Yoga

Options

---template=: default these are all the integrations GraphQL Yoga supports. Basically we can point this to our examples we have in this repo to bootstrap. So the folder name in that directory become the name for template flag. If you give a GitHub repo or path then it will bootstrap from that

  • --use-npm: To explicitly bootstrap with npm
  • --use-pnpm: To explicitly bootstrap with pnpm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions