Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TomDoesTech/NextJS-With-Apollo-Client-Tutorial

Repository files navigation

Connect Next.js with GraphQL API using Apollo Client 3

YouTube video: https://www.youtube.com/watch?v=4yDrtFUbUzo

Features

  • Don't have to use getServerSideProps or getStaticProps for SSR
  • Typed hooks generated from the GraphQL schema

Bootstrap Next.js project

  • Create app with npx create-next-app
  • Convert to TypeScript project
  • Install dependencies

Connect to GraphQL API

  • Create Apollo HOC with the next-with-apollo modules
  • How to control client-side and server-side rendering

Generate Type, hooks with graphql-code generator

Let's keep in touch

Buy me a Coffee

Sign up to DigitalOcean πŸ’–

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /