Content management
Evolve integrates with headless CMS platforms through dedicated CMS services. Each CMS service translates vendor-specific content into a shared GraphQL schema, so the frontend and other consumers work with the same types regardless of which CMS is behind them.
Out of the box, Evolve ships with services for Storyblok and Contentful. The architecture makes it straightforward to add support for other CMS platforms.
How it works
Every CMS service follows the same internal pattern:
- Loaders: fetch content from the CMS API using DataLoaders for batching and caching. Results are cached with a TTL (typically 5 minutes) and scoped by store context.
- Mappers: convert vendor-specific data structures into the shared GraphQL types. Each CMS has its own mappers for assets, pages, navigation, and layout components.
- Resolvers: expose the mapped content through the GraphQL schema. Resolvers are the same across CMS implementations since they work with the shared types.
Shared schema
Both CMS services expose the same GraphQL types:
AbstractPage: base interface for all pages with fields for path, translated paths, breadcrumbs, and SEO metadataContentPage: pages built from CMS content blocks (about, contact, landing pages)CatalogPage: pages that combine CMS content with product data (category pages, brand pages)PageMeta: SEO metadata (title, description, keywords, OpenGraph data)
Key queries include page(path) for fetching any page by its URL
path, siteLayout() for header and footer content, and
contentSnippet() for reusable content blocks.
Webhooks
Each CMS service receives webhooks when content is published or updated. The webhook handler invalidates the relevant cache entries so that fresh content is served on the next request without waiting for the TTL to expire.
Adding a new CMS
To integrate a different CMS platform, create a new service that implements the same GraphQL schema. You need:
- Vendor-specific type definitions for the CMS API responses
- Loaders that fetch content from the CMS API
- Mappers that convert vendor types to the shared GraphQL types
- A webhook handler for cache invalidation
The resolvers and GraphQL schema can be reused from the existing CMS services since they operate on the shared types.
🗃️ storyblok
3 items