Our great sponsors
-
graphql-code-generator
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
The Nextjs GitHub page has several graphql examples. This one, which I like, uses apollo-server-micro: https://github.com/vercel/next.js/tree/canary/examples/api-routes-graphql
For the client, I used Apollo with graphql-code-generator - gives you hooks and really nice typings for GraphQL
I just used pg-promise - it handles the connections for you, up to you to write the SQL.
The gist of it is actually covered by the next-auth example app: https://github.com/nextauthjs/next-auth-example/blob/main/pages/api/examples/protected.js
Related posts
- Backend C# + Frontend React?
- Making GraphQL Codegen Work For You: GraphQL Integration with React and TypeScript
- I made an open-source starter template for full-stack universal(web + mobile) apps! (tRPC, Expo, Next, Solito, Tamagui, Clerk Auth, Prisma!)
- The Complete Modern React Developer 2022
- graphql-let - A Webpack loader for GraphQL Code Generator