Examples

If you are in the Overview section of the Dashboard for a project, you've probably noticed the Connect button on the right side of the page. If you select that button, we pop up a window with two code examples, one for cURL and one in JavaScript, that include the API key and endpoint to retrieve the names of the types in your schema.

You must replace API-KEY with your API key and ENDPOINT with your endpoint in the code examples. You can retrieve the API key and endpoint for your project in the Overview section of the Dashboard for a project.

We also support tokens from OpenID Connect providers. See the Authorization and Authentication topic for details.

The examples directory in our https://github.com/grafbase/grafbase repository contains projects using Grafbase in various frameworks. Feel free to use any of them to jump start your project using Grafbase.

All of these examples implement a simple project using the schema from our todo template (https://github.com/grafbase/grafbase/tree/main/templates/todo) to manage lists of todo items.

This example project uses Next.js (https://nextjs.org/), which is an open-source web development framework built on top of Node.js, enabling React-based web applications functionalities such as server-side rendering and generating static websites.

This example project uses nuxt (https://nuxtjs.org/), which is an open source JavaScript library based on Vue.js, Node.js, Webpack, and Bable.js.