Warning
Grafbase has ceased support for SSE, which is causing the demo to malfunction
- Grafbase
- SvelteKit
- Houdini
- Auth.js
- GraphQL Live Queries (Server-Sent Events)
- Tailwind CSS
- Run
npx degit grafbase/grafbase/examples/sveltekit-houdini grafbase-with-houdini
to clone this example - Change directory into the new folder
cd grafbase-with-houdini
- Run
cp .env.example .env
- Open
.env
in your code editor, and provide your Grafbase API endpoint and API key - Run
npm install
, oryarn install
to install dependencies - Run
npm run dev
, oryarn dev
and visithttp://localhost:5173
- Fork and Push this repo to GitHub
- Create an account with Grafbase
- Create new project with Grafbase and connect your forked repo
- Add environment variable
AUTH_SECRET
during project creation - Create a GitHub OAuth App with your app details for production purposes. Make sure to set
Authorization callback URL
to[YOUR_DESIRED_VERCEL_DOMAIN]/auth/callback/github
- Deploy to Vercel and add
.env
values (PUBLIC_GRAFBASE_API_URL
*,AUTH_SECRET
,GITHUB_CLIENT_ID
,GITHUB_CLIENT_SECRET
)
* PUBLIC_GRAFBASE_URL
is your production API endpoint. You can find this from the Connect modal in your project dashboard.
To learn more about Grafbase, take a look at the following resources:
- Grafbase - learn about Grafbase features and API.
To learn more about SvelteKit, take a look at the following resources:
-
SvelteKit Documentation - learn about SvelteKit features and API.
-
Houdini Documentation - learn about Houdini features and API.