altair-fastify-plugin
v8.0.5
Published
Fastify Plugin of Altair GraphQL Client
Downloads
6,459
Readme
altair-fastify-plugin
This is a Fastify Plugin for hosting an instance of Altair GraphQL Client, with support for TypeScript, and tested for Fastify v3.
Install
npm install altair-fastify-plugin
# or
yarn add altair-fastify-plugin
Usage
// const Fastify = require("fastify");
import Fastify from 'fastify';
// const AltairFastify = require("altair-fastify-plugin");
import AltairFastify from 'altair-fastify-plugin';
const app = Fastify();
// ...
app.register(AltairFastify, {
/**
* All these are the defaults.
*/
path: '/altair',
baseURL: '/altair/',
endpointURL: '/graphql',
});
// ...
// Altair available at localhost:3000/altair
app.listen(3000);