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

?
boba fetterman@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 🔥

?
Roy Barber@roybarberuk

This looks awesome! @nextjs + @grafbase on @vercel will be 🔥🔥🔥

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?