A NextJS starter for WordPress installations with WPGraphQL, including TypeScript and dynamic type generating with graphql-codegen
- Works out of the box with any WordPress installation including WPGraphQL
- TypeScript and dynamic type generating with graphql-codegen
- Prettier, ESLint, Husky and Lint Staged
- Tailwind CSS
- Clone this repository to your machine
- Run
yarn install - Rename
.env.local.exampletoenv.localfile - Add your
WORDPRESS_API_URLurl to your.env.localfile - Run
yarn generate:codegento generate types* - Run
yarn devto start a local server and start developing
By running yarn generate:codegen you can generate types right from your WPGraphQL schema and the operations defined in .src/graphql/**/*. You can see and updat the confing in the codegen.yml file in the root of your project. The endpoint is loaded from the .env.local file.