storipress / apollo-vue-devtools

Integrate GraphQL Apollo with Vue Devtools!

Home Page:https://storipress.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apollo-vue-devtool: Integrate Apollo with Vue Devtools

Usage

  1. Add the plugin to your Vue project:
import { createApp } from 'vue'
import Plugin from '@storipress/apollo-vue-devtool'
import App from './App.vue'

const app = createApp(App)
app.use(Plugin)
app.mount('#app')
  1. Add the DebugLink to your Apollo client:
import { DebugLink } from '@storipress/apollo-vue-devtool'
import { ApolloClient, ApolloLink, HttpLink } from '@apollo/client/client'

const client = new ApolloClient({
  link: ApolloLink.from([
    new DebugLink(),
    new HttpLink({
      uri: 'http://example.com/graphql',
    }),
  ]),
})
  1. Now open Vue Devtools and you'll see your queries in the timeline!

Installation

NPM

$ npm install --save-dev @storipress/apollo-vue-devtool

Yarn

$ yarn add --dev @storipress/apollo-vue-devtool

About

Integrate GraphQL Apollo with Vue Devtools!

https://storipress.com

License:MIT License


Languages

Language:TypeScript 51.0%Language:JavaScript 41.2%Language:Vue 4.8%Language:HTML 2.6%Language:CSS 0.4%