---
title: Why I Prefer Datastar Over Vue + GraphQL for Most Craft CMS Projects
date: 2025-10-06T15:16:00+02:00
author: webworker
canonical_url: "https://craft-kit.dev/blog/why-i-prefer-datastar-over-vue-and-graphql"
section: Blog
---
I used to reach for Craft, GraphQL and Vue whenever a website needed interactivity. For most content-driven projects, I now prefer Craft, Twig and Datastar. The reason is practical: I can deliver the same useful interactions with fewer layers to coordinate.

## What Vue and GraphQL solve

A separate frontend application makes sense when it is genuinely an application: complex offline behavior, substantial browser-owned data, or several clients consuming the same API. Craft's GraphQL API can serve a web frontend, a mobile app and other integrations from one content model.

That is a different requirement from a website that needs search, filters and pagination. I do not want to introduce an API boundary solely to update a list of Craft entries.

## What the extra layer costs

Craft generates a GraphQL schema from the content model and permissions; you do not have to invent that schema manually. You still need to maintain frontend queries, rendering components, loading states and error handling around the API.

For a single website, that can mean expressing the same content relationships in Craft, in API queries and in the frontend's rendering layer. Those boundaries can be valuable for an independent frontend team. In a small Craft team, I often find they add coordination without enough benefit.

## Let Craft render the response

Craft already knows how to query entries, resolve relations, transform assets and render Twig. Datastar lets those templates remain the UI: an interaction requests an endpoint, the server returns HTML patches, and the browser updates the relevant elements.

The response can finish immediately. An SSE response does not require a permanent connection, and a live-search interaction does not require a dedicated streaming server.

Datastar signals handle transient browser state. Craft owns saved data, permissions and validation. The boundary is explicit without a separate frontend store or client-side router.

## One model for everyday interactions

This site is a working example. The mobile menu, navigation dropdowns and search panel use Datastar, just like the blog filters, map filters and Todo List. There is no Alpine layer for the small interactions and another framework for the bigger ones.

Specialist tools still do specialist work: Leaflet draws the map, Embla handles the slider and GLightbox opens galleries. Datastar coordinates the ordinary UI and server-driven updates; it does not need to replace a mapping engine.

## When I would still choose Vue and GraphQL

I would choose them when the product needs a separately deployed application, an API shared across several clients, or complex browser-side workflows that justify that architecture. This is not a claim that a server-rendered website can replace every application.

## See the smaller stack in practice

Try the [filterable blog](https://craft-kit.dev/blog), [live search](https://craft-kit.dev/search) and [Todo List](/hypermedia-todolist-craft-cms-datastar). Each demonstrates a useful interaction while Craft remains responsible for the response.

For most Craft websites, that is the default I want: content in Craft, markup in Twig, reactivity in Datastar. [Craft Kit gives you the working starting point.](https://github.com/handplant/craftcms-lazy-starter-kit)
