graphql-voyager-fastify-plugin
v0.1.3
Published
This is a [**Fastify Plugin**](https://www.fastify.io/docs/master/Plugins/) for hosting an instance of **GraphQL Voyager**, with support for **TypeScript**, and tested for **Fastify v3**.
Downloads
816
Readme
graphql-voyager-fastify-plugin
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