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

altair-fastify-plugin

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

altair-fastify-plugin - npm Package Compare versions

Comparing version 1.4.11 to 2.4.10

example/fastifyGQL.js

4

dist/index.d.ts
/// <reference types="node" />
import { RenderOptions } from "altair-static";
import type { FastifyPluginCallback } from "fastify";
import { RenderOptions } from 'altair-static';
import type { FastifyPluginCallback } from 'fastify';
export interface AltairFastifyPluginOptions extends RenderOptions {

@@ -5,0 +5,0 @@ /**

@@ -11,9 +11,9 @@ "use strict";

if (renderOptions.baseURL == null) {
renderOptions.baseURL = "/altair/";
renderOptions.baseURL = '/altair/';
}
if (renderOptions.endpointURL == null) {
renderOptions.endpointURL = "/graphql";
renderOptions.endpointURL = '/graphql';
}
if (path == null) {
path = "/altair";
path = '/altair';
}

@@ -26,3 +26,3 @@ fastify.register(fastify_static_1.default, {

fastify.get(path, (_req, res) => {
res.type("text/html").send(altairPage);
res.type('text/html').send(altairPage);
});

@@ -32,4 +32,4 @@ done();

exports.default = fastify_plugin_1.default(fastifyAltairPlugin, {
fastify: ">= 3.x",
name: "altair-fastify-plugin",
fastify: '>= 3.x',
name: 'altair-fastify-plugin',
});
{
"name": "altair-fastify-plugin",
"version": "1.4.11",
"version": "2.4.10",
"description": "Fastify Plugin of Altair GraphQL Client",

@@ -12,9 +12,9 @@ "keywords": [

],
"homepage": "https://imolorhe.github.io/altair/tree/master/packages/altair-fastify-plugin#readme",
"homepage": "https://github.com/imolorhe/altair#readme",
"bugs": {
"url": "https://github.com/PabloSzx/altair/issues"
"url": "https://github.com/imolorhe/altair/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/PabloSzx/altair.git"
"url": "git+https://github.com/imolorhe/altair.git"
},

@@ -26,5 +26,7 @@ "license": "MIT",

"files": [
"dist"
"dist",
"example"
],
"scripts": {
"example": "ts-node example/fastifyGQL.ts",
"prepublish": "tsc"

@@ -40,2 +42,3 @@ },

"fastify-gql": "^5.1.1",
"ts-node": "^8.10.2",
"typescript": "^3.9.7"

@@ -42,0 +45,0 @@ },

@@ -1,11 +0,40 @@

# `altair-fastify-plugin`
# altair-fastify-plugin
> TODO: description
[![npm](https://img.shields.io/npm/v/altair-fastify-plugin.svg)](https://www.npmjs.com/package/altair-fastify-plugin)
## Usage
This is a [**Fastify Plugin**](https://www.fastify.io/docs/master/Plugins/) for hosting an instance of **Altair GraphQL Client**, with support for **TypeScript**, and tested for **Fastify v3**.
## Install
```sh
npm install altair-fastify-plugin
# or
yarn add altair-fastify-plugin
```
const altairFastifyPlugin = require('altair-fastify-plugin');
// TODO: DEMONSTRATE API
## Usage
```js
// 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);
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc