cia1099 / graphql-client

This is an example and test graphql web builded by flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL Client

A GraphQL application project. This project used local stream notification instead of subscription. Local stream example

visit this site: https://graphql-test.web.app/

Deploy step

  1. install firebase nad initialized project in terminal

  2. First, we need login machine in firbase then get token

firebase login:ci
>>>> 1//0ee2ndomhKWaLCgYIARAAGA4SNwF-L9IrI_bZ1nDAXWc4vFVrvIdksGJGFMUWEl-****MY Token

add --token $TOKEN to command of firebase every time in terminal

  1. Test and preview

在發布預覽前,先在firebase Hosting網頁新增其他網站,自己另命名一個Site-Id,之後這個Site-Id要在先前執行firebase init hosting生成的firebase.json,裡面標記deploy的域名地方:

// firebase.json
"hosting": {
    "site": "graphql-test", //加入目的地,不然預設是project-Id
    "public": "build/web",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }

之後可以清除先前的建置,重新建一個release版

flutter clean
flutter build web
# deploy to preview channel within 1 day
firebase hosting:channel:deploy preview-version --expires 1d
# if you satisfied this preview, you can clone to live channel
firebase hosting:clone graphql-test:preview-version graphql-test:live

Server side

About

This is an example and test graphql web builded by flutter


Languages

Language:Dart 64.5%Language:JavaScript 35.5%