next-graphql-react v16.0.0
next-graphql-react
A graphql-react integration for Next.js.
Installation
Within an existing Next.js project, to install next-graphql-react and its graphql-react peer dependency with npm, run:
npm install next-graphql-react graphql-reactSetup the Next.js custom App module:
- Polyfill the required globals.
- Decorate the default export with the function
withGraphQLReact.
Then React hooks imported from graphql-react can be used within the Next.js project pages and components.
Requirements
Supported runtime environments:
- Node.js versions
^18.17.0 || >=20.4.0. - Browsers matching the Browserslist query
> 0.5%, not OperaMini all, not dead.
Projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check comment:
compilerOptions.allowJsshould betrue.compilerOptions.maxNodeModuleJsDepthshould be reasonably large, e.g.10.compilerOptions.moduleshould be"node16"or"nodenext".
Exports
The npm package next-graphql-react features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json field exports:
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago