Generate a fullstack project using Apollo GraphQL (node.js, express), graphql-codegen for Types and React (vite)
npm install create-vite-apollo-fs``sh`
npm create vite-apollo-fs@latest
This template creates a React project (vite) with Apollo Server (Node.js / Express), including:
- api: Apollo Server with GraphQL support
- codegen: Code generation for TypeScript types from GraphQL schema
- web-ui: React frontend with Apollo Client
You get sample code for a GraphQL API and a React frontend that can be used as a starting point for your own projects.
Web-Socket support is included for real-time updates.
This command will ask you for a destination path, api name and web-ui name:
`sh`
npm create vite-apollo-fs@latest
Using parameters:
`sh
npm create vite-apollo-fs@latest -- --destinationPath=myProject --apiName=my-api --webUiName=my-web-ui
npx create-vite-apollo-fs@latest --destinationPath=myProject --apiName=my-api --webUiName=my-web-ui
`
Destination File Structure:
```
my-project
├── codegen
├── my-api
└── my-web-ui
See: Development Workflow for more details on how to use the generated project.
- https://vite.dev/
- https://www.apollographql.com/docs/apollo-server
- https://nodejs.org
- https://expressjs.com/