Skip to content

📋 A Next.js Guestbook app with Fauna backend using GraphQL, boilerplate code from Vercel

Notifications You must be signed in to change notification settings

AndrewJBateman/next-fauna-data

Repository files navigation

⚡ Next Fauna Data

  • A Next.js Guestbook app with Fauna backend using GraphQL, boilerplate code from Vercel
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

📄 Table of contents

📚 General Info

📷 Screenshots

Example screenshot Example screenshot

📶 Technologies

💾 Setup

  • npm run dev runs the app in the development mode. Open http://localhost:3000 to view it in the browser. Note: requires Fauna API key
  • npm run build builds the app for production to the build folder. Note: requests Fauna API key
  • npm run start to run the built app.

💻 Code Examples - taken from Vercel boilerplate code

  • lib/fauna.js mutation function to create a new guestbook entry
export const createGuestbookEntry = (newEntry) => {
  const mutation = gql`
    mutation CreateGuestbookEntry($input: GuestbookEntryInput!) {
      createGuestbookEntry(data: $input) {
        _id
        _ts
        name
        message
        createdAt
      }
    }
  `

  return graphQLClient.request(mutation, { input: newEntry })
}

📋 Status & To-Do List

  • Status: Working. Deployed to Vercel
  • To-Do: Add extra fields and a user image/icon. Need Fauna API key to run dev. server

👏 Inspiration

📁 License

  • N/A

✉️ Contact

Releases

No releases published

Packages

No packages published