Valhalla Examples is an open-source repository of runnable sample sites that demonstrate how to build Gatsby, Next.js, and Astro applications against the Valhalla unified GraphQL API, which aggregates WordPress, Contentful, and Shopify data.
What is Valhalla Examples?
Valhalla Examples is a collection of framework-specific implementations of the Valhalla API, a service that produces a unified GraphQL API from multiple content sources. The repository contains three sample sites — one each for Gatsby, Next.js, and Astro — all presenting the same "Pet Snuggles" demo content. Each folder has its own package dependencies and run command, and the README explicitly welcomes community contributions to add frameworks or improve code quality.
Key Features
- Three framework examples — Gatsby, Next.js, and Astro, each in its own
frameworks/subfolder with separatepackage.jsonand run scripts. - Unified GraphQL API — Valhalla combines Contentful, WordPress, and Shopify into a single GraphQL endpoint that all examples consume.
- Live demo sites — Petsnugglesgatsby.gatsbyjs.io, valhalla-nextjs.vercel.app, and astro-valhalla.netlify.app let you see each implementation running.
- Content source variety — Contentful supplies the pets (pups, cats, exotics), WordPress supplies the blog, and Shopify supplies e-commerce functionality.
- Community contribution model — The README invites pull requests and asks that new framework code match idiomatic standards for data fetching and code style.
- Simple local workflow — After cloning, run
yarnin the root, thenyarnin the chosen framework folder to install dependencies.
Who should use Valhalla Examples?
- Developers new to Valhalla — Use these examples to learn how to fetch data from a single GraphQL API backed by multiple CMSs.
- Teams comparing JavaScript frameworks — The same Pet Snuggles site in Gatsby, Next.js, and Astro provides side-by-side code patterns for routing, data fetching, and deployment.
- Open-source contributors — Add support for another framework or refine existing examples; maintainers explicitly request idiomatic code.
What can you do with Valhalla Examples?
- Build a multi-source demo store — Follow the Next.js example to see how Shopify products, Contentful pet listings, and WordPress posts are combined into one queryable API.
- Explore Gatsby's GraphQL layer — The Gatsby example produces its own GraphQL API and requires additional environment variables internal to the Gatsby team, offering a deeper view of Gatsby's data system.
- Deploy a static site — The Astro example shows how to connect the Valhalla GraphQL API to a static site generator, deployable to Netlify.
How does Valhalla Examples work?
To run any example locally, clone the repository and run yarn in the root to install base dependencies. Then enter the specific framework folder — for example cd frameworks/nextjs && yarn dev — and start the development server. The Gatsby example has an extra step: it requires environment variables that are internal to the Gatsby team, while the other examples work directly off the produced GraphQL API.







