Skip to content

LiKang6688/nextjs-graphql-swr-hasura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-graphql-swr-hasura

The Idea

This is a demo app demonstrating usage of SWR or React Query library with a Hasura GraphQL API. The app uses native websockets or Subscriptions Transport Ws for implementing GraphQL subscriptions on the client.

  • Hasura GraphQL APIs for instant GraphQL backend.
  • Integrate GraphQL queries.
  • Integrate GraphQL mutations.
  • GraphQL Subscriptions using native websockets or Subscriptions Transport Ws.

Fetch + GraphQL + SWR + WebSocket

GraphQL Request + GraphQL + SWR

Apollo Client + GraphQL + SWR + Subscriptions Transport Ws

Apollo Client + GraphQL + React Query

.env.local

NEXT_PUBLIC_HASURA_ADMIN_SECRET=

NEXT_PUBLIC_HASURA_URL=

SECRET=

How to Use

Install it and run:

yarn
yarn dev
# or
npm install
npm run dev