/hasura-nextjs-ssr

Next.js application using getServerSideProps with Hasura.

Primary LanguageJavaScript

Hasura Next.js SSR

This example uses Hasura, Next.js, and graphql-request to fetch data from a GraphQL API and render server-side.

Create Your Own

  1. Create your own GraphQL API with Hasura. image
  2. Inside the console, create a new schema and add some data. image
  3. Optional: Secure your API endpoint. image

Running Locally

  1. Install dependencies by running yarn or npm install.
  2. Create an .env.local file.
  3. Populate HASURA_API_URL.
  4. Optional: Populate HASURA_ADMIN_SECRET.
  5. Run yarn dev or npm run dev to start the application at http://localhost:3000.

Deployment

Deploy this project in one-click with Vercel. You'll need to have your environment variables ready.

Deploy with Vercel