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.example
toenv.local
file - Add your
WORDPRESS_API_URL
url to your.env.local
file - Run
yarn generate:codegen
to generate types* - Run
yarn dev
to 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.