@platyplus/vue-hasura-backend-plus
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@platyplus/vue-hasura-backend-plus

Vue plugin for Hasura Backend Plus. Works either with Vue 3 or the Vue Composition API, thanks to Vue Demi.

Installation

yarn add @platyplus/vue-hasura-backend-plus

Edit your main Vue file:

import { createHasuraBackendPlus } from '@platyplus/vue-hasura-backend-plus'
import { createApp } from 'vue'

import App from './App.vue'

const hbp = createHasuraBackendPlus({
  endpoint: 'https://hasura-backend-plus.endpoint.com',
  refreshInSeconds: 600, // Defaults to 600 (10 minutes)
  router // Optional: vue-router instance. When set, will make sure the authentication is know prior to any routing
})

createApp(App).use(hbp).mount('#app')

Usage

Vue compositions:

  • useRegister
  • useLogin
  • useLogout
  • useStatus
  • useHasuraClaims
  • useAllowedRoles
  • useDefaultRole

Readme

Keywords

none

Package Sidebar

Install

npm i @platyplus/vue-hasura-backend-plus

Homepage

platy.dev

Weekly Downloads

3

Version

0.2.1

License

MIT

Unpacked Size

18.7 kB

Total Files

18

Last publish

Collaborators

  • plmercereau