https://github.com/dopaminedriven/nextjs-headless-wp
Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS
https://github.com/dopaminedriven/nextjs-headless-wp
apollo-client codegen edge graphql gravity gravity-forms headless-wordpress jwt-authentication nextjs typescript wpgraphql
Last synced: about 1 month ago
JSON representation
Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS
- Host: GitHub
- URL: https://github.com/dopaminedriven/nextjs-headless-wp
- Owner: DopamineDriven
- License: mit
- Created: 2022-03-14T03:18:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T07:35:44.000Z (about 3 years ago)
- Last Synced: 2025-01-21T22:14:11.447Z (3 months ago)
- Topics: apollo-client, codegen, edge, graphql, gravity, gravity-forms, headless-wordpress, jwt-authentication, nextjs, typescript, wpgraphql
- Language: TypeScript
- Homepage: https://www.andrewross.tech
- Size: 6.77 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unwrap (JSX.IntrinsicElements) Namespace in root index.d.ts
Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS
## On Demand Revalidation (ISR)
- can be a web hook, a click event, etc -- now ISR can be manually toggled only WHEN data changes
```ts
// location: src/pages/api/revalidate/index.ts
import type { NextApiRequest, NextApiResponse } from "next";export default async function handler(
_req: NextApiRequest,
res: NextApiResponse<{ revalidated: boolean }>
) {
await res.unstable_revalidate("/");
return res.json({ revalidated: true });
}
```