graphql-voyager-fastify-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

graphql-voyager-fastify-plugin

npm

This is a Fastify Plugin for hosting an instance of GraphQL Voyager, with support for TypeScript, and tested for Fastify v3.

Install

npm install graphql-voyager-fastify-plugin

Usage

import fastify from 'fastify'
import GraphQLVoyagerFastify from 'graphql-voyager-fastify-plugin'

const app = fastify()

// ...

app.register(GraphQLVoyagerFastify, {
  /**
   * All these are the defaults.
   */
  // url path
  path: '/voyager',
  // graphql endpoint path
  endpoint: '/graphql'
});

// ...

// Voyager available at localhost:3000/voyager
app.listen(3000);

References

Heavily based on Altair Fastify Plugin and this repo by bdatdo0601.

To publish to npm I read this guide and this other guide.

Contributors

  • Olivier Refalo: I am not ready to switch to graphql-ez, adjusted this experiment and made it work with the CDN version of graphql-voyager

Readme

Keywords

Package Sidebar

Install

npm i graphql-voyager-fastify-plugin

Weekly Downloads

477

Version

0.1.3

License

GPL-3.0

Unpacked Size

87.6 kB

Total Files

16

Last publish

Collaborators

  • orefalo
  • ricardovalero