New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hrwg/apollo-nuxt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hrwg/apollo-nuxt

Nuxt 3 integration for Apollo GraphQL

0.2.1
latest
npm
Version published
Maintainers
1
Created
Source

Apollo Nuxt Module

npm version

This module integrates Apollo GraphQL for Vue with Nuxt 3.

Please note

Since @vue/apollo-composable is still in alpha and this module depends on it, caution is advised, since future changes may occur that break the functionality or compatibility of this module.

Features

  • Creation and injection of an Apollo GraphQL client into a Nuxt 3 app
  • Functional on server- and client-side
  • Enables use of @vue/apollo-composable

Current Limitations

  • Only configuration is the uri of the GraphQL endpoint
  • Due to @vue/apollo-composable being in alpha, breaking changes may occur in the future

Installation

The module can be installed by running the following command:

npm i @hrwg/apollo-nuxt

It is activated and configured, by adding it to the nuxt.config.ts.

import { defineNuxtConfig } from 'nuxt';

export default defineNuxtConfig({
    modules: [
        '@hrwg/apollo-nuxt',
    ],
    apolloNuxt: {
        uri: 'http://localhost:3000/api/graphql',
    },
});

The configuration parameter uri is the GraphQL endpoint.

Usage

After installation, GraphQL queries can be executed according to the Vue Apollo Documentation.

For a simple example, refer to the Playground Project.

Development

  • Run npm i to install dependencies.
  • Run npm run dev:prepare to generate type stubs.
  • Use npm run dev to start playground in development mode.

Changelog

This project adheres to Semantic Versioning. Please refer to the CHANGELOG.md for detailed changes and migration instructions.

License

MIT

Keywords

nuxt

FAQs

Package last updated on 27 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts