Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

Repository files navigation

Async Vue Apollo functions

The project create the async version of useQuery and useMutation on a vue based projects with Vue Apollo server.

Authors

Installation

Install with yarn:

  yarn add @requrv/vue-apollo-async

Install with npm:

  npm install @requrv/vue-apollo-async

Usage/Examples

import ReQurvApollo from '@requrv/vue-apollo-async'

const requrvApollo = new ReQurvApollo()

// Mutation
const { apolloMutation } = requrvApollo.useAsyncMutation({
    document: MutationDocument,
    options: {
        variables: {
            ...any variables
        }
    }
})
const { data } = await apolloMutation() // data is the mutation result

// Query
const { apolloQuery } = requrvApollo.useAsyncQuery({
    document: QueryDocument,
    variables: {
        ...any variables
    }
})
const { data } = await apolloQuery() // data is the query result

License

MIT

About

A module to use Async Apollo functions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages