Josh Goldberg

GraphQL + Apollo + Next.js: A Lovely Trio

What if your frontend components were always in sync with your API? See how to achieve end-to-end type safety with Next.js, GraphQL, and Apollo.

GraphQL + Apollo + Next.js: A Lovely Trio
#1about 5 minutes

Getting started with Next.js for React applications

Next.js provides file-system based routing and a Link component that enables fast, single-page application navigation with intelligent prefetching.

#2about 6 minutes

Exploring data fetching strategies in Next.js

Learn to pre-render pages with data using `getStaticProps` for build-time generation and `getServerSideProps` for fresh data on every request.

#3about 5 minutes

Implementing dynamic routes and using TypeScript

Create dynamic pages using bracket syntax in filenames and leverage Next.js's built-in support for TypeScript to add type safety to your components and props.

#4about 4 minutes

Understanding the core concepts of GraphQL APIs

GraphQL allows clients to request exactly the data they need by querying a well-defined schema, which enables powerful, auto-generated documentation and tooling.

#5about 3 minutes

How to build a GraphQL schema with resolvers

Define your API's capabilities by writing a GraphQL schema and implementing resolver functions that fetch the data for each field.

#6about 4 minutes

Using variables in queries and performing mutations

Pass dynamic values into your queries using variables and modify server-side data by defining and executing GraphQL mutations.

#7about 3 minutes

Auto-generating types with GraphQL Code Generator

Use GraphQL Code Generator to automatically create TypeScript types and even React hooks directly from your GraphQL schema and query files.

#8about 3 minutes

Connecting Next.js and GraphQL with Apollo Client

Integrate your GraphQL API into a Next.js application using Apollo Client to manage state, caching, and data fetching with generated React hooks.

#9about 4 minutes

The benefits of a composable JavaScript ecosystem

React's focused, single-purpose design fosters a rich ecosystem of specialized libraries, enabling developers to mix and match tools for rapid innovation.

#10about 2 minutes

Q&A on GraphQL federation and Next.js authentication

The speaker answers audience questions about using GraphQL to query multiple REST microservices and strategies for handling authentication.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.