Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-graphql

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-graphql

Apollo server plugin for Fastify

  • 4.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fastify-graphql

Travis npm Conventional Commits

A plugin for Fastify that adds GraphQL and GraphiQL support.

This project was forked from fastify-apollo as it is no longer being maintained fast enough to keep pace with the rapid changes happening in the GraphQL ecosystem.

Installation

npm install --save fastify-graphql graphql

or

yarn add fastify-graphql graphql

Usage

const Fastify = require('fastify');
const app = Fastify();

const {graphiqlFastify, graphqlFastify} = require('fastify-graphql');
app.register(graphqlFastify, { 
  prefix: '/graphql', 
  graphql: {
    schema: your_graphql_schema,
  },
});
app.register(graphiqlFastify, {
  prefix: '/graphiql',
  graphiql: {
    endpointURL: '/graphql',
  }
});

Configuration

Both plugins need to be given a prefix, under which they will mount.

GraphQL settings extends GraphQLServerOptions

GraphiQL settings extends GraphiQLData

Keywords

FAQs

Package last updated on 04 Sep 2018

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

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