I Still Use Gatsby for Some Things (Unfortunately)

Gatsby GraphQL Data Layer Architecture

So we're rebuilding our company's documentation site. Three different content sources: Contentful for marketing pages, WordPress for the blog, and our internal API for product specs. The project manager wants everything looking unified - same navigation, same search, same everything.

First instinct was Next.js. Set up API routes to fetch from each source, build some shared components, call it a day. Except content comes from three different schemas, the blog uses WordPress's weird category structure, and the product specs change every week when engineering updates the API.

Three weeks into development, I had custom loading states for each content type, three different error handling patterns, and a caching strategy held together with duct tape and prayer. Every time someone added a new content field, I had to update the API route, the TypeScript interfaces, and the frontend components. Pure fucking hell.

Manager suggests trying Gatsby since the CIA website apparently uses it for similar multi-source content. Figured I'd waste a few days proving it wouldn't work, then get approval to rebuild everything in Next.js properly.

Turned out Gatsby's GraphQL layer actually handles this exact nightmare scenario. Write your sources once:

// gatsby-config.js
plugins: [
  'gatsby-source-contentful',
  'gatsby-source-wordpress', 
  'gatsby-source-custom-api'
]

Then query everything through one interface. All your data shows up in GraphiQL, relationships get created automatically, and you get one fucking query instead of three API calls with separate error handling.

When Your React Team Doesn't Want to Learn Yet Another Thing

Our frontend team knows React, Apollo Client, and TypeScript. That's it. They're good at those tools, but asking them to learn Astro's component syntax or Hugo's Go templates means weeks of ramping up.

With Gatsby, they write the same React components they've been writing for years. Same hooks, same component composition, same context patterns. The only new thing is GraphQL queries, and if your team already uses Apollo, that's not even new.

TypeScript docs switched to Gatsby specifically because their contributor base didn't want to learn a different framework. Airbnb Design did the same thing. When experienced React developers can be productive on day one without reading documentation, that's worth something.

The Plugin Ecosystem Actually Works (Unlike Most Frameworks)

Gatsby Plugin Ecosystem

Gatsby has 2,000+ plugins and most of them actually work together without breaking everything. The image plugin (gatsby-plugin-image) automatically handles responsive images, lazy loading, WebP conversion, and blur placeholders. No configuration hell, no CDN setup nightmares.

Try doing the same thing in Next.js and you'll spend a day configuring next/image, setting up CloudFront, and debugging why your responsive images look like shit on mobile:

// Gatsby: Automatic responsive images from GraphQL
<GatsbyImage image={data.image.childImageSharp.gatsbyImageData} />

// Next.js: Manual configuration required
<Image 
  src=\"/image.jpg\" 
  width={800} 
  height={600}
  srcSet=\"...\" // Manual responsive variants
/>

The Gatsby plugin library has mature solutions for SEO, PWA stuff, analytics, and CMS connections that don't fuck with each other. Next.js can do the same things but good luck spending 3 days configuring dependencies that inevitably conflict.

When You Need Lighthouse Scores That Don't Suck

Lighthouse Performance Scores

Gatsby generates static HTML with inline CSS and no render-blocking bullshit. Sourcegraph's docs get perfect Lighthouse scores without any performance optimization work. That's not marketing - that's just what happens when you pre-render everything.

Here's what you get out of the box:

  • Critical CSS inlining: Above-the-fold styles load immediately (no FOUC)
  • Code splitting: Each page loads only the JS it needs
  • Prefetching: Next page resources load in background while user reads
  • Image optimization: Automatic WebP, resizing, compression - all handled

Try implementing all that manually in other frameworks. Web.dev performance guides keep using Gatsby sites as examples of how to do performance right because it's actually hard to fuck up.

The One Time 47-Minute Builds Didn't Ruin My Life

So our marketing site at my last company updated maybe twice a month. New blog posts, product announcements, that kind of shit. The CEO would request changes on Friday at 5pm and expect them live Monday morning. Perfect use case for slow builds, right?

Wrong. First time our copywriter Sarah needed to fix a typo on the pricing page, she pushed to main at 2:30pm expecting a quick fix. Forty-seven fucking minutes later, the build was still running when the customer demo started at 3:00. Had to explain to prospects why our pricing page still said "Entreprise" instead of "Enterprise" during the product walkthrough. Sarah never used git push without asking me first after that.

But here's the thing - for purely marketing sites that genuinely update monthly, Gatsby's build time stops mattering. Our company blog got maybe 2 posts per month. WordPress would've been overkill with PHP version updates and security patches every week. Static files on Netlify just sit there working without maintenance.

The Figma blog probably rebuilds once a week for new posts. Nobody at Figma is sitting around waiting for builds to finish so they can preview a comma change. That's the only scenario where Gatsby's slowness doesn't actively hurt productivity.

Production Actually Works (Development Is Hell)

Production Gatsby sites are bulletproof once they're built. The React docs serve millions of developers without downtime, Apollo's GraphQL blog handles traffic spikes during conference announcements, Airbnb Design has been rock solid for years.

Static HTML and CSS files don't crash. No server memory leaks, no database timeouts, no Node.js processes dying unexpectedly. Put it on CloudFlare or AWS CloudFront and forget about it.

Meanwhile, development mode is a nightmare. gatsby develop starts at 400MB RAM and climbs to 3GB after an hour of hot reloading. My MacBook Pro fans spin up just opening the project. Hot reload breaks randomly and requires full restarts. The GraphiQL interface crashes if you query too much data at once.

But once it's built? Rock solid. The Figma blog hasn't gone down in years. Hosting costs are basically nothing - entire sites run on $5/month Netlify plans while your Next.js app needs a $50/month Vercel plan to handle traffic spikes. No server crashes, no database timeouts, no surprise AWS bills when your article hits the front page of Hacker News.

When to Choose Gatsby vs Alternatives

Scenario

Best Choice

Why

Avoid If

Content site with multiple CMSs

Gatsby

GraphQL unifies data sources automatically

Real-time content updates needed

React team building docs

Gatsby

Zero learning curve, familiar patterns

Team prefers TypeScript-first approach

High-traffic marketing site

Gatsby

Static CDN deployment, perfect uptime

Frequent A/B testing required

E-commerce with <1000 products

Gatsby

Build time acceptable, SEO optimized

Complex user accounts/checkout

Developer blog/portfolio

Gatsby

Plugin ecosystem handles everything

Want minimal setup complexity

Documentation with search

Gatsby

Mature plugins for full-text indexing

Need real-time collaboration

Agency client sites

Gatsby

Template reuse, proven performance

Client wants backend admin

Large e-commerce (>5000 products)

Next.js

ISR handles scale without memory issues

Pure static site acceptable

Real-time dashboard

Next.js

SSR required for dynamic data

Can accept static updates

Simple brochure site

Astro

Faster builds, less complexity

Need React ecosystem integration

Content site with live updates

Next.js

ISR updates without rebuilds

Can batch content updates

Multi-lingual content site

Next.js

Better i18n routing support

Single language acceptable

Real Success Stories and Implementation Patterns

Production Sites That Actually Work

CIA.gov: Government-Scale Content Management

The CIA's official website demonstrates Gatsby handling enterprise requirements. With 3,000+ pages spanning multiple content types, security clearance levels, and data sources, they needed a framework that could unify complex content without compromising performance. The U.S. Digital Service and 18F have documented similar government website requirements for performance and accessibility. Their case studies show how government sites benefit from static generation approaches like JAMstack architectures.

Their implementation uses Gatsby's data layer to combine:

  • Classified document metadata (sanitized for public view)
  • Press releases from multiple government agencies
  • Historical archives in different formats
  • Multi-language content for international audiences

The result: sub-1-second page loads for a site serving millions of monthly visitors. Try achieving that with WordPress or Drupal handling government-scale content requirements.

Documentation Sites: TypeScript, React, Apollo

TypeScript's documentation rebuilt with Gatsby in 2022 and hasn't looked back. Similar to how Jest and Prettier handle their docs, TypeScript needed a solution that could handle complex technical content. The previous Next.js implementation struggled with:

  • Cross-referencing between API docs and guides
  • Generating multiple output formats from the same source
  • Managing versioned documentation across TypeScript releases

Gatsby's GraphQL layer automatically creates relationships between code examples, API references, and explanatory text. Contributors write in MDX, and the build process generates searchable, interconnected documentation.

Similarly, Apollo GraphQL uses Gatsby for their developer blog because it integrates seamlessly with their existing GraphQL tooling. The irony isn't lost—the GraphQL company chose the GraphQL-native static site generator. Other GraphQL-heavy projects like Hasura and Dgraph followed similar patterns. The GraphQL Foundation itself uses static site tooling for their documentation.

Performance Patterns That Actually Work

Web Performance Metrics Comparison

Image-Heavy Content Sites

Airbnb Design showcases Gatsby's automatic image optimization. Their design system documentation includes hundreds of component screenshots, before/after comparisons, and high-resolution mockups.

With gatsby-plugin-image, every image automatically gets:

  • WebP conversion with JPEG fallbacks
  • Responsive variants for different screen sizes
  • Lazy loading with blur placeholders
  • Critical image prioritization for above-fold content

The manual equivalent in Next.js requires configuring next/image, setting up CloudFront distributions, and writing custom responsive image logic. Gatsby handles this complexity transparently.

Multi-Source Content Aggregation

News sites and content aggregators benefit from Gatsby's unified data layer. A typical implementation pulls from:

  • Headless CMS for editorial content (Contentful, Strapi)
  • Social media APIs for embedded content (Twitter, Instagram)
  • Analytics APIs for trending/popular content
  • E-commerce APIs for product information

The GraphQL schema automatically creates relationships between these sources. A product review can reference the product data, author information, and related social media discussions in a single query.

Compare this to Next.js where each data source requires separate API routes, caching strategies, and error handling. The complexity multiplies with each additional source.

Plugin Ecosystem Advantages

SEO and Analytics Integration

Gatsby's plugin ecosystem provides battle-tested solutions for common requirements:

  • gatsby-plugin-google-gtag: Google Analytics 4 integration with GDPR compliance
  • gatsby-plugin-sitemap: Automatic XML sitemaps with dynamic content
  • gatsby-plugin-robots-txt: Robots.txt generation based on environment
  • gatsby-plugin-schema-snapshot: Schema validation for large sites

These plugins work together without conflicts. The equivalent Next.js setup requires manual integration, testing for compatibility issues, and ongoing maintenance as APIs change.

Performance Monitoring

Production Gatsby sites integrate with performance monitoring tools seamlessly:

  • gatsby-plugin-webpack-bundle-analyser: Bundle size tracking
  • gatsby-plugin-offline: Service worker caching strategies
  • gatsby-plugin-preact: Smaller runtime for performance-critical sites
  • gatsby-plugin-csp: Content Security Policy headers

The plugin architecture ensures these optimizations don't interfere with each other. Next.js achieves similar results but requires more configuration and potential conflicts between optimization approaches.

Development Workflow Advantages

Content Creator Experience

Content Management Workflow

Non-technical team members work better with Gatsby's content workflows:

  1. Preview environments: Gatsby Cloud provides branch-based previews for content review
  2. Build notifications: Slack/email alerts when content publishing completes
  3. Error handling: Clear build failures when content structure changes
  4. Content relationships: GraphQL automatically validates links between content

This matters for teams where marketing, design, and development collaborate on content. The structured approach prevents content errors that break production sites.

Developer Experience for React Teams

Teams already using React, GraphQL, and modern tooling find Gatsby familiar:

The learning curve for experienced React developers is minimal. Compare this to Hugo (Go templates), Jekyll (Liquid), or Astro (new component syntax) where existing React knowledge doesn't transfer.

When Good Gatsby Goes Bad

Even in ideal scenarios, Gatsby sites hit performance walls. The GraphQL data layer that makes development pleasant becomes a memory-hungry monster at scale. Your perfectly architected content structure starts timing out during builds when you hit 5,000+ pages.

If your Gatsby site is showing stress fractures - longer build times, memory errors, or random failures - the next section covers the optimization techniques that can buy you more time before migration becomes unavoidable.

Real Questions Developers Actually Ask About Gatsby

Q

Is Gatsby dead now that Netlify bought it?

A

Not dead, but not exactly thriving either.

Gatsby gets security updates and bug fixes. GitHub activity shows 2-3 commits monthly

  • enough to keep the lights on but not much innovation happening.Honestly, this is fine for most use cases. No breaking changes means your shit doesn't randomly break when you update. If you need bleeding-edge features, look elsewhere. If you want something that works and stays working, maintenance mode isn't the worst thing.
Q

How much RAM will this thing actually eat?

A

Medium sites (1,000-3,000 pages) typically need 2-4GB during builds. Start with NODE_OPTIONS="--max_old_space_size=4096" and bump it up if your build crashes with OOM errors. Heavy image processing or complex GraphQL queries can push you to 6-8GB.The memory usage scales predictably with content volume. It's not the exponential nightmare some people claim

  • that usually means you're doing something wrong with your queries or image processing.
Q

The Shopify plugin is broken, what do I do?

A

Yeah, the official gatsby-source-shopify plugin uses old API versions that Shopify deprecated. You've got a few options:

  1. Fork it yourself: Update the API version from 2024-01 to 2024-07 (migration guide)
  2. Use community forks: gatsby-shopify-theme stays more current
  3. Write your own: Custom source plugin using Shopify's REST API

Budget 2-3 days for this bullshit. The API changes are documented well enough, and there are working examples floating around GitHub.

Q

Should I use Gatsby or Next.js for a new project?

A

Use Gatsby when:

  • Content updates happen in batches (daily/weekly, not hourly)
  • You need to pull from multiple CMSs without losing your mind
  • SEO and Core Web Vitals actually matter to your business
  • Your team already knows React/GraphQL
  • Hosting costs matter ($5/month vs $50/month)

Use Next.js when:

  • You need real-time content updates
  • You have mixed static/dynamic pages in the same app
  • You've got >5,000 pages and builds are getting painful
  • Build times are killing developer productivity

Stop asking for universal "best practices" - it depends on your specific situation.

Q

Are the 47-minute build time complaints bullshit or real?

A

Depends on what you're building. For docs sites, marketing pages, and blogs that update daily/weekly, 10-47 minute builds are fine. You get it deployed and forget about it. The performance benefits are worth the wait.

Build times become a problem when:

  • You need to rebuild constantly during development (use gatsby develop)
  • Content updates multiple times per day
  • Large e-commerce sites with real-time inventory changes

Use incremental builds and proper caching. Most build time horror stories come from people doing it wrong.

Q

Where should I host this thing?

A

Static hosting is the whole point of using Gatsby. Don't overthink it:

  • Netlify: $0-19/month, branch previews and forms just work
  • Vercel: $0-20/month, great performance monitoring
  • AWS S3 + CloudFront: $5-15/month if you want full control
  • GitHub Pages: Free for public repos, basic but reliable

Don't use server hosting (Heroku, DigitalOcean) - you're missing the point. Static files on a CDN is Gatsby's biggest advantage.

Q

How hard is it to escape to Next.js if I need to?

A

Budget 3-4 weeks for medium sites. It's not trivial but not impossible:

Week 1: Pages and routing

  • Convert Gatsby pages to Next.js app directory
  • Basic layouts and components
  • TypeScript and ESLint setup

Week 2: Data fetching hell

  • Replace GraphQL queries with fetch calls or API routes
  • Convert useStaticQuery to whatever Next.js uses now
  • Fix all the data transformation logic

Week 3: Images and assets

  • Replace gatsby-image with next/image (prepare for frustration)
  • Configure optimization settings
  • Update all imports and references

Week 4: Make it actually work

  • Fix build scripts and deployment
  • Test everything (twice)
  • Performance audit to make sure you didn't break everything

The migration guide has details but expect some pain.

Q

Are the plugins going to break my shit?

A

Gatsby's plugin ecosystem is mature but slow-moving. Most essential plugins still get updates:

  • Image optimization plugins are actively maintained
  • SEO and analytics plugins work fine
  • CMS source plugins - depends on how popular they are

Before starting, check if your required plugins have been updated recently. Popular plugins (>1000 weekly downloads) usually get community maintenance even if officially abandoned.

Q

Is the GraphQL thing actually worth it or just hype?

A

For multi-source content sites, yes. The unified query interface saves you from writing custom data fetching logic for every source. Single-source sites might find it overkill.

GraphQL pays off when you're combining:

  • Headless CMS content
  • API data (products, users, analytics)
  • Static files (markdown, images, documents)
  • External services (social media, search)

Automatic relationships and type safety beat manual data fetching hell. But if you're just pulling from one CMS, it might be unnecessary complexity.

Q

How fast is it actually going to be?

A

Well-built Gatsby sites consistently hit:

  • First Contentful Paint: <1 second
  • Largest Contentful Paint: <2.5 seconds
  • Cumulative Layout Shift: <0.1
  • First Input Delay: <100ms

Those Core Web Vitals scores mean better search rankings and users don't bounce. Static output with pre-optimized assets gives you predictable performance that SSR apps can't match consistently.

Essential Resources for Gatsby Success

Related Tools & Recommendations

compare
Similar content

Next.js, Nuxt, SvelteKit, Remix vs Gatsby: Enterprise Guide

18 months in Gatsby hell, 6 months testing everything else - here's what actually works for enterprise teams

Next.js
/compare/nextjs/nuxt/sveltekit/remix/gatsby/enterprise-team-scaling
100%
compare
Similar content

Astro, Next.js, Gatsby: Static Site Generator Benchmark

Just use fucking Astro. Next.js if you actually need server shit. Gatsby is dead - seriously, stop asking.

Astro
/compare/astro/nextjs/gatsby/static-generation-performance-benchmark
83%
tool
Similar content

Webpack: The Build Tool You'll Love to Hate & Still Use in 2025

Explore Webpack, the JavaScript build tool. Understand its powerful features, module system, and why it remains a core part of modern web development workflows.

Webpack
/tool/webpack/overview
65%
tool
Similar content

Gatsby to Next.js Migration: Costs, Timelines & Gotchas

Real costs, timelines, and gotchas from someone who survived the process

Gatsby
/tool/gatsby/migration-strategy
56%
tool
Similar content

Gatsby's Decline: Slow Builds, Memory Leaks & Netlify Impact

And why you shouldn't start new projects with it in 2025

Gatsby
/tool/gatsby/overview
52%
tool
Similar content

React Error Boundaries in Production: Debugging Silent Failures

Learn why React Error Boundaries often fail silently in production builds and discover effective strategies to debug and fix them, preventing white screens for

React Error Boundary
/tool/react-error-boundary/error-handling-patterns
51%
tool
Similar content

Fix Slow Gatsby Builds: Boost Performance & Prevent Crashes

Turn 47-minute nightmares into bearable 6-minute builds while you plan your escape

Gatsby
/tool/gatsby/fixing-build-performance
50%
integration
Similar content

Claude API React Integration: Secure, Fast & Reliable Builds

Stop breaking your Claude integrations. Here's how to build them without your API keys leaking or your users rage-quitting when responses take 8 seconds.

Claude API
/integration/claude-api-react/overview
49%
tool
Similar content

Surviving Gatsby Plugin Hell: Maintain Abandoned Plugins in 2025

How to maintain abandoned plugins without losing your sanity (or your job)

Gatsby
/tool/gatsby/plugin-hell-survival
42%
tool
Similar content

Create React App is Dead: Why & How to Migrate Away in 2025

React team finally deprecated it in 2025 after years of minimal maintenance. Here's how to escape if you're still trapped.

Create React App
/tool/create-react-app/overview
40%
integration
Recommended

I Spent Two Weekends Getting Supabase Auth Working with Next.js 13+

Here's what actually works (and what will break your app)

Supabase
/integration/supabase-nextjs/server-side-auth-guide
39%
tool
Recommended

Next.js - React Without the Webpack Hell

competes with Next.js

Next.js
/tool/nextjs/overview
39%
tool
Similar content

Migrate from Create React App to Vite & Next.js: A Practical Guide

Stop suffering with 30-second dev server startup. Here's how to migrate to tools that don't make you want to quit programming.

Create React App
/tool/create-react-app/migration-guide
36%
tool
Recommended

Astro - Static Sites That Don't Suck

competes with Astro

Astro
/tool/astro/overview
35%
tool
Recommended

Fix Astro Production Deployment Nightmares

competes with Astro

Astro
/tool/astro/production-deployment-troubleshooting
35%
tool
Similar content

JetBrains WebStorm Overview: Is This JavaScript IDE Worth It?

Explore JetBrains WebStorm, the powerful JavaScript IDE for React and web development. Discover its features, compare it to VS Code, and find out if it's worth

WebStorm
/tool/webstorm/overview
32%
tool
Recommended

GitHub Actions Security Hardening - Prevent Supply Chain Attacks

integrates with GitHub Actions

GitHub Actions
/tool/github-actions/security-hardening
32%
alternatives
Recommended

Tired of GitHub Actions Eating Your Budget? Here's Where Teams Are Actually Going

integrates with GitHub Actions

GitHub Actions
/alternatives/github-actions/migration-ready-alternatives
32%
tool
Recommended

GitHub Actions - CI/CD That Actually Lives Inside GitHub

integrates with GitHub Actions

GitHub Actions
/tool/github-actions/overview
32%
tool
Similar content

React State Management: Choose the Best Solution for Your App

Redux is overkill. Context breaks everything. Local state gets messy. Here's when to use what.

React
/tool/react/state-management-decision-guide
28%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization