graphql-engine/community/sample-apps/vuetify-vuex-todo-graphql
Samir Talwar d9afcc1857 Upgrade all package-lock.json files to the v2 format.
NPM v7 uses a new (backwards-compatible) lockfile format. This upgrades all our various _package-lock.json_ files to use the new format.

It's much more verbose so that NPM can be a lot faster.

I figured it was cleaner to do this once in a separate PR rather than upgrading them in combination with adding or upgrading a new dependency.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5869
GitOrigin-RevId: 322fb63b96e2d873a4a3cc05fa6c7afa414716ce
2022-09-28 08:15:29 +00:00
..
public add github workflow to compress new images in PRs 2021-03-10 20:55:02 +00:00
src add github workflow to compress new images in PRs 2021-03-10 20:55:02 +00:00
.browserslistrc add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
.eslintrc.js add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
.gitignore add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
.postcssrc.js add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
babel.config.js add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
package-lock.json Upgrade all package-lock.json files to the v2 format. 2022-09-28 08:15:29 +00:00
package.json add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30
README.md readme: use cloud signup endpoint for "Deploy to Hasura" CTA 2021-08-19 07:03:05 +00:00
vue.config.js add vuetify-vuex-todo-graphql sample app (#1866) 2019-03-26 14:36:46 +05:30

vuetify-vuex-todo-graphql

A simple Todo PWA (Progressive Web App) inspired by TodoMVC, Vue.js, Vuex and Vuetify technologies, forked from davidgararo/vuetify-todo-pwa, adding Hasura GraphQL integration

Edit vuetify-vuex-todo-graphql

Tutorial

  • Deploy GraphQL Engine on Hasura Cloud and setup PostgreSQL via Heroku:

    Deploy to Hasura Cloud

  • Get the Hasura app URL (say my-app.hasura.app)

  • Create todos table:

    Open Hasura console: visit https://my-app.hasura.app on a browser
    Navigate to Data section in the top nav bar and create a table as follows:

    Create todos table

  • Clone this repo:

    git clone https://github.com/hasura/graphql-engine
    cd graphql-engine/community/sample-apps/vuetify-vuex-todo-graphql
    
  • Install node modules:

    npm install
    
  • Open src/apollo.js and configure Hasura's GraphQL Endpoint as follows:


import Vue from 'vue'
import VueApollo from 'vue-apollo'
import { ApolloClient } from 'apollo-client'
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'

const httpLink = new HttpLink({
  // You should use an absolute URL here
  uri: 'https://myapp.hasura.app/v1/graphql'
})

// Create the apollo client
export const apolloClient = new ApolloClient({
  link: httpLink,
  cache: new InMemoryCache(),
  connectToDevTools: true
})

const apolloProvider = new VueApollo({
  defaultClient: apolloClient
})

// Install the vue plugin
Vue.use(VueApollo)

export default apolloProvider

In the httpLink, replace myapp.hasura.app with your own Hasura Project URL of Hasura GraphQL Engine that you deployed above

  • Compile and hot-reload for development
  npm run serve
  • Production Build
  npm run build