Skip to content

stanidesis/with-graphql-faunadb

Repository files navigation

FaunaDB Graphql Starter Example -- The FaunaDB Guestbook

This simple Guestbook SPA example shows you how to use FaunaDB's GraphQL endpoint in your Next.js project. [Live demo].

Why FaunaDB

By importing a .gql or .graphql schema into FaunaDB (see our sample schema file), FaunaDB will generate required Indexes and GraphQL resolvers for you -- hands free 👐 (some limitations exist).

How To Use This Template

You can start with this template using create-next-app or by downloading the repository manually.

To use a live FaunaDB database, create one and import this example's schema.gql file using the FaunaDB console. Create a client secret, then paste it into next.config.js.

Use create-next-app

Download create-next-app to bootstrap the example:

npm install -g create-next-app
create-next-app --example with-graphql-faunadb

Download This Template Manually

Download the example or clone the repo:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-graphql-faunadb
cd with-graphql-faunadb

Run Locally

Install, then run the development server:

npm install
now dev

Make sure to leave us a guestbook message in our live demo! 😉

Deploy

Deploy it to the cloud with now! Install now on your development machine before proceeding.

now

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published