• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

praveenweb/swr-graphql: A sample Next.js app using Zeit's SWR React Hooks to ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

praveenweb/swr-graphql

开源软件地址(OpenSource Url):

https://github.com/praveenweb/swr-graphql

开源编程语言(OpenSource Language):

JavaScript 98.7%

开源软件介绍(OpenSource Introduction):

swr-graphql

The Idea behind the Example

This is a sample app demonstrating usage of useSWR, mutate and trigger of SWR library with a Hasura GraphQL API. The app uses native websockets for implementing GraphQL subscriptions on the client.

  • Hasura GraphQL APIs for instant GraphQL backend.
  • Integrate simple GraphQL queries.
  • Optimistic UI with GraphQL mutations.
  • GraphQL Subscriptions using native websockets.

Deploy Hasura to get a GraphQL API

  1. Click on the following button to deploy GraphQL engine on Hasura Cloud including Postgres add-on or using an existing Postgres database:

    Deploy to Hasura Cloud

  2. Open the Hasura console

    Click on the button "Launch console" to open the Hasura console.

  3. Create table users

    Head to the Data tab and create a new table called users with columns: id (text), name (text), created_at (timestamp now()).

  4. Try out a GraphQL Query

    query {
        users {
            id
            name
            created_at
        }
    }

One-Click Deploy

Deploy your own SWR project with ZEIT Now.

Deploy with ZEIT Now

How to Use

Install it and run:

yarn
yarn dev
# or
npm install
npm run dev

Deploy it to the cloud with now (download)

now



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap