The data platform that powers your Nuxt application

Build and scale your Nuxt application backed by your own GraphQL API.

Grafbase + Nuxt

Nuxt gives you all the tools you need to build production scale applications. Whether you need to fetch data on the server, at build time when creating a static export, or caching on demand, Nuxt has you covered.

Fetch data on the client from your Grafbase project using a GraphQL client like urql.
<script setup>
  import { gql, useQuery } from "@urql/vue";

  const GetTodos = gql`
    query TodoLists {
      todoListCollection {
        edges {
          node {
            id
            title
            todos {
              id
              title
              complete
            }
          }
        }
      }
    }`

  const { data, fetching, error } = useQuery({ query: GetTodos });
</script>
<template>
  <div>
    <div v-if="fetching">Loading...</div>
    <div v-else-if="error">{{ error }}</div>
    <div v-else-if="data" class="flex gap-6">
      <div
        v-for="list in data.todoListCollection?.edges"
        :key="list?.node?.id"
      >
        <TodoList v-if="list?.node?.id" v-bind="list.node" />
      </div>
      <TodoListCreate />
    </div>
  </div>
</template>
Fetch data on the client from your Grafbase project using a GraphQL client like urql.
<script setup>
  import { gql, useQuery } from "@urql/vue";

  const GetTodos = gql`
    query TodoLists {
      todoListCollection {
        edges {
          node {
            id
            title
            todos {
              id
              title
              complete
            }
          }
        }
      }
    }`

  const { data, fetching, error } = useQuery({ query: GetTodos });
</script>
<template>
  <div>
    <div v-if="fetching">Loading...</div>
    <div v-else-if="error">{{ error }}</div>
    <div v-else-if="data" class="flex gap-6">
      <div
        v-for="list in data.todoListCollection?.edges"
        :key="list?.node?.id"
      >
        <TodoList v-if="list?.node?.id" v-bind="list.node" />
      </div>
      <TodoListCreate />
    </div>
  </div>
</template>

Testimonials

?
Simon Grimm@schlimmson

Tried @grafbase and was impressed how easy & fast it was to create your serverless GraphQL API + local instance 🔥

?
Rasmus Hjulskov@RasmusHjulskov

Current fantasy tech stack 🚀: - @nextjs - @tailwindcss - @typescript - @trpcio - @grafbase - @ClerkDev

?
Kate@whoiskatrin

As an engineer, I'm always on the lookout for tools that make my job easier and more efficient. @grafbase has quickly become a go-to for me in my #GraphQL development work. Its real-time query execution and intuitive schema management have saved me countless hours of debugging

?
Roy@royboy789

Done playing with @Cloudflare Pages & Workers, for now. Now to learn some @grafbase and see how if it can play a role, because it is pretty nifty!

?
Bobby Blastbeats@tubbo

not sure if @grafbase is so good that it will actually obviate my entire job, or if it's good enough that i can use it at work without someone questioning my existence. either way, i am sold on the concept of "upload some SDL and query shit, stop worrying about the DB infra".

?
Ben@nurodev

Damn, trying out the @grafbase beta & it's super slick! Feels like what @planetscaledata is doing for databases, @Grafbase is going for #GraphQL 🔥

Start building with Nuxt

We’ve made it super easy to get started integrating Grafbase with Nuxt.

Quickstart

Learn the basics of Grafbase and deploy to production in only a few short steps.

Developer Guides

Learn how to use Grafbase with frontend frameworks, external APIs, and more.

Nuxt Example

Want to see what it looks like in a project already hooked up?